Class ATNConfigSet.AbstractConfigHashSet

java.lang.Object
org.antlr.v4.runtime.misc.Array2DHashSet<ATNConfig>
org.antlr.v4.runtime.atn.ATNConfigSet.AbstractConfigHashSet
All Implemented Interfaces:
Iterable<ATNConfig>, Collection<ATNConfig>, Set<ATNConfig>
Direct Known Subclasses:
ATNConfigSet.ConfigHashSet, OrderedATNConfigSet.LexerConfigHashSet
Enclosing class:
ATNConfigSet

public abstract static class ATNConfigSet.AbstractConfigHashSet extends Array2DHashSet<ATNConfig>
  • Constructor Details

  • Method Details

    • asElementType

      protected final ATNConfig asElementType(Object o)
      Description copied from class: Array2DHashSet
      Return 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(Object) and Array2DHashSet.remove(Object) methods to ensure the arguments to the EqualityComparator for the set always have the expected types.
      Overrides:
      asElementType in class Array2DHashSet<ATNConfig>
      Parameters:
      o - the object to try and cast to the element type of the set
      Returns:
      o if it could be an instance of T, otherwise null.
    • createBuckets

      protected final ATNConfig[][] createBuckets(int capacity)
      Description copied from class: Array2DHashSet
      Return an array of T[] with length capacity.
      Overrides:
      createBuckets in class Array2DHashSet<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: Array2DHashSet
      Return an array of T with length capacity.
      Overrides:
      createBucket in class Array2DHashSet<ATNConfig>
      Parameters:
      capacity - the length of the array to return
      Returns:
      the newly constructed array