Package org.antlr.v4.runtime.atn
Class ATNConfigSet.AbstractConfigHashSet
- java.lang.Object
-
- org.antlr.v4.runtime.misc.Array2DHashSet<ATNConfig>
-
- org.antlr.v4.runtime.atn.ATNConfigSet.AbstractConfigHashSet
-
- Direct Known Subclasses:
ATNConfigSet.ConfigHashSet,OrderedATNConfigSet.LexerConfigHashSet
- Enclosing class:
- ATNConfigSet
public abstract static class ATNConfigSet.AbstractConfigHashSet extends Array2DHashSet<ATNConfig>
-
-
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, initialCapacity, LOAD_FACTOR, n, threshold
-
-
Constructor Summary
Constructors Constructor Description AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator)AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator, int initialCapacity, int initialBucketCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ATNConfigasElementType(Object o)Returnoas an instance of the element typeT.protected ATNConfig[]createBucket(int capacity)Return an array ofTwith lengthcapacity.protected ATNConfig[][]createBuckets(int capacity)Return an array ofT[]with lengthcapacity.-
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
spliterator
-
-
-
-
Constructor Detail
-
AbstractConfigHashSet
public AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator)
-
AbstractConfigHashSet
public AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator, int initialCapacity, int initialBucketCapacity)
-
-
Method Detail
-
asElementType
protected final ATNConfig asElementType(Object o)
Description copied from class:Array2DHashSetReturnoas an instance of the element typeT. Ifois non-null but known to not be an instance ofT, this method returnsnull. The base implementation does not perform any type checks; override this method to provide strong type checks for theArray2DHashSet.contains(java.lang.Object)andArray2DHashSet.remove(java.lang.Object)methods to ensure the arguments to theEqualityComparatorfor the set always have the expected types.- Overrides:
asElementTypein classArray2DHashSet<ATNConfig>- Parameters:
o- the object to try and cast to the element type of the set- Returns:
oif it could be an instance ofT, otherwisenull.
-
createBuckets
protected final ATNConfig[][] createBuckets(int capacity)
Description copied from class:Array2DHashSetReturn an array ofT[]with lengthcapacity.- Overrides:
createBucketsin classArray2DHashSet<ATNConfig>- Parameters:
capacity- the length of the array to return- Returns:
- the newly constructed array
-
createBucket
protected final ATNConfig[] createBucket(int capacity)
Description copied from class:Array2DHashSetReturn an array ofTwith lengthcapacity.- Overrides:
createBucketin classArray2DHashSet<ATNConfig>- Parameters:
capacity- the length of the array to return- Returns:
- the newly constructed array
-
-