Package org.antlr.v4.runtime.atn
Class PredictionMode.AltAndContextConfigEqualityComparator
- java.lang.Object
-
- org.antlr.v4.runtime.misc.AbstractEqualityComparator<ATNConfig>
-
- org.antlr.v4.runtime.atn.PredictionMode.AltAndContextConfigEqualityComparator
-
- All Implemented Interfaces:
EqualityComparator<ATNConfig>
- Enclosing class:
- PredictionMode
private static final class PredictionMode.AltAndContextConfigEqualityComparator extends AbstractEqualityComparator<ATNConfig>
-
-
Field Summary
Fields Modifier and Type Field Description static PredictionMode.AltAndContextConfigEqualityComparator
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
AltAndContextConfigEqualityComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(ATNConfig a, ATNConfig b)
This method tests if two objects are equal.int
hashCode(ATNConfig o)
The hash code is only a function of theATNState.stateNumber
andATNConfig.context
.
-
-
-
Field Detail
-
INSTANCE
public static final PredictionMode.AltAndContextConfigEqualityComparator INSTANCE
-
-
Method Detail
-
hashCode
public int hashCode(ATNConfig o)
The hash code is only a function of theATNState.stateNumber
andATNConfig.context
.- Parameters:
o
- The object.- Returns:
- The hash code for
obj
.
-
equals
public boolean equals(ATNConfig a, ATNConfig b)
Description copied from interface:EqualityComparator
This method tests if two objects are equal.- Parameters:
a
- The first object to compare.b
- The second object to compare.- Returns:
true
ifa
equalsb
, otherwisefalse
.
-
-