public abstract static class ATNConfigSet.AbstractConfigHashSet extends Array2DHashSet<ATNConfig>
Array2DHashSet.SetIterator
buckets, comparator, currentPrime, INITAL_BUCKET_CAPACITY, INITAL_CAPACITY, initialBucketCapacity, LOAD_FACTOR, n, threshold
Constructor and Description |
---|
ATNConfigSet.AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator) |
ATNConfigSet.AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator,
int initialCapacity,
int initialBucketCapacity) |
Modifier and Type | Method and Description |
---|---|
protected ATNConfig |
asElementType(Object o)
Return
o as an instance of the element type T . |
protected ATNConfig[] |
createBucket(int capacity)
Return an array of
T with length capacity . |
protected ATNConfig[][] |
createBuckets(int capacity)
Return an array of
T[] with length capacity . |
add, addAll, clear, contains, containsAll, containsFast, equals, expand, get, getBucket, getOrAdd, getOrAddImpl, hashCode, isEmpty, iterator, remove, removeAll, removeFast, retainAll, size, toArray, toArray, toString, toTableString
public ATNConfigSet.AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator)
public ATNConfigSet.AbstractConfigHashSet(AbstractEqualityComparator<? super ATNConfig> comparator, int initialCapacity, int initialBucketCapacity)
protected final ATNConfig asElementType(Object o)
Array2DHashSet
o
as an instance of the element type T
. If
o
is non-null but known to not be an instance of T
, this
method returns null
. The base implementation does not perform any
type checks; override this method to provide strong type checks for the
Array2DHashSet.contains(java.lang.Object)
and Array2DHashSet.remove(java.lang.Object)
methods to ensure the arguments to
the EqualityComparator
for the set always have the expected
types.asElementType
in class Array2DHashSet<ATNConfig>
o
- the object to try and cast to the element type of the seto
if it could be an instance of T
, otherwise
null
.protected final ATNConfig[][] createBuckets(int capacity)
Array2DHashSet
T[]
with length capacity
.createBuckets
in class Array2DHashSet<ATNConfig>
capacity
- the length of the array to returnprotected final ATNConfig[] createBucket(int capacity)
Array2DHashSet
T
with length capacity
.createBucket
in class Array2DHashSet<ATNConfig>
capacity
- the length of the array to returnCopyright © 1992-2013 ANTLR. All Rights Reserved.