public class ArrayPredictionContext extends PredictionContext
| Modifier and Type | Field and Description |
|---|---|
PredictionContext[] |
parents
Parent can be null only if full ctx mode and we make an array
from
PredictionContext.EMPTY and non-empty. |
int[] |
returnStates
Sorted for merge, no duplicates; if present,
PredictionContext.EMPTY_RETURN_STATE is always last. |
cachedHashCode, EMPTY, EMPTY_RETURN_STATE, globalNodeCount, id| Constructor and Description |
|---|
ArrayPredictionContext(PredictionContext[] parents,
int[] returnStates) |
ArrayPredictionContext(SingletonPredictionContext a) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
PredictionContext |
getParent(int index) |
int |
getReturnState(int index) |
boolean |
isEmpty()
This means only the
PredictionContext.EMPTY context is in set. |
int |
size() |
java.lang.String |
toString() |
calculateEmptyHashCode, calculateHashCode, calculateHashCode, combineCommonParents, fromRuleContext, getAllContextNodes_, getAllContextNodes, getCachedContext, hasEmptyPath, hashCode, merge, mergeArrays, mergeRoot, mergeSingletons, toDOTString, toString, toStrings, toStringspublic final PredictionContext[] parents
PredictionContext.EMPTY and non-empty. We merge PredictionContext.EMPTY by using null parent and
returnState == PredictionContext.EMPTY_RETURN_STATE.public final int[] returnStates
PredictionContext.EMPTY_RETURN_STATE is always last.public ArrayPredictionContext(SingletonPredictionContext a)
public ArrayPredictionContext(PredictionContext[] parents, int[] returnStates)
public boolean isEmpty()
PredictionContextPredictionContext.EMPTY context is in set.isEmpty in class PredictionContextpublic int size()
size in class PredictionContextpublic PredictionContext getParent(int index)
getParent in class PredictionContextpublic int getReturnState(int index)
getReturnState in class PredictionContextpublic boolean equals(java.lang.Object o)
equals in class PredictionContextpublic java.lang.String toString()
toString in class java.lang.Object