Package org.antlr.v4.runtime.atn
Class ATNConfigSet.ConfigHashSet
- java.lang.Object
-
- org.antlr.v4.runtime.misc.Array2DHashSet<ATNConfig>
-
- org.antlr.v4.runtime.atn.ATNConfigSet.AbstractConfigHashSet
-
- org.antlr.v4.runtime.atn.ATNConfigSet.ConfigHashSet
-
- All Implemented Interfaces:
java.lang.Iterable<ATNConfig>
,java.util.Collection<ATNConfig>
,java.util.Set<ATNConfig>
- Enclosing class:
- ATNConfigSet
public static class ATNConfigSet.ConfigHashSet extends ATNConfigSet.AbstractConfigHashSet
The reason that we need this is because we don't want the hash map to use the standard hash code and equals. We need all configurations with the same(s,i,_,semctx)
to be equal. Unfortunately, this key effectively doubles the number of objects associated with ATNConfigs. The other solution is to use a hash table that lets us specify the equals/hashcode operation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.antlr.v4.runtime.misc.Array2DHashSet
Array2DHashSet.SetIterator
-
-
Field Summary
-
Fields inherited from class org.antlr.v4.runtime.misc.Array2DHashSet
buckets, comparator, currentPrime, INITAL_BUCKET_CAPACITY, INITAL_CAPACITY, initialBucketCapacity, LOAD_FACTOR, n, threshold
-
-
Constructor Summary
Constructors Constructor Description ConfigHashSet()
-
Method Summary
-
Methods inherited from class org.antlr.v4.runtime.atn.ATNConfigSet.AbstractConfigHashSet
asElementType, createBucket, createBuckets
-
Methods inherited from class org.antlr.v4.runtime.misc.Array2DHashSet
add, addAll, clear, contains, containsAll, containsFast, equals, expand, get, getBucket, getOrAdd, getOrAddImpl, hashCode, isEmpty, iterator, remove, removeAll, removeFast, retainAll, size, toArray, toArray, toString, toTableString
-
-