Class OrderedATNConfigSet

java.lang.Object
org.antlr.v4.runtime.atn.ATNConfigSet
org.antlr.v4.runtime.atn.OrderedATNConfigSet
All Implemented Interfaces:
Iterable<ATNConfig>, Collection<ATNConfig>, Set<ATNConfig>

public class OrderedATNConfigSet extends ATNConfigSet
Lexer configuration set that merges configs only when they are fully equal (including prediction context and lexer actions), preserving first-match preference order among alternatives.

PERF: The merge index keys configs by ATNConfig.hashCode(), which is cached on ATNConfig after the first computation. Capacity-aware construction reduces rehashing during lexer reach/closure fan-out.

  • Constructor Details

    • OrderedATNConfigSet

      public OrderedATNConfigSet()
    • OrderedATNConfigSet

      public OrderedATNConfigSet(int expectedSize)
      Constructs an empty, writable ordered config set with the given capacity hint for primary storage. See ATNConfigSet(int).
      Parameters:
      expectedSize - expected number of configurations, or <= 0 for the default map/list capacities
    • OrderedATNConfigSet

      public OrderedATNConfigSet(ATNConfigSet set, boolean readonly)
  • Method Details