Class ATNConfigSet.AbstractConfigHashSet
java.lang.Object
org.graalvm.shadowed.org.antlr.v4.runtime.misc.Array2DHashSet<ATNConfig>
org.graalvm.shadowed.org.antlr.v4.runtime.atn.ATNConfigSet.AbstractConfigHashSet
- Direct Known Subclasses:
ATNConfigSet.ConfigHashSet,OrderedATNConfigSet.LexerConfigHashSet
- Enclosing class:
ATNConfigSet
-
Nested Class Summary
Nested classes/interfaces inherited from class org.graalvm.shadowed.org.antlr.v4.runtime.misc.Array2DHashSet
Array2DHashSet.SetIterator -
Field Summary
Fields inherited from class org.graalvm.shadowed.org.antlr.v4.runtime.misc.Array2DHashSet
buckets, comparator, currentPrime, INITAL_BUCKET_CAPACITY, INITAL_CAPACITY, initialBucketCapacity, initialCapacity, LOAD_FACTOR, n, threshold -
Constructor Summary
ConstructorsConstructorDescriptionAbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator) AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator, int initialCapacity, int initialBucketCapacity) -
Method Summary
Modifier and TypeMethodDescriptionprotected final ATNConfigReturnoas an instance of the element typeT.protected final ATNConfig[]createBucket(int capacity) Return an array ofTwith lengthcapacity.protected final ATNConfig[][]createBuckets(int capacity) Return an array ofT[]with lengthcapacity.Methods inherited from class org.graalvm.shadowed.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, toTableStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
AbstractConfigHashSet
-
AbstractConfigHashSet
public AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator, int initialCapacity, int initialBucketCapacity)
-
-
Method Details
-
asElementType
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
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
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
-