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 EMPTY and non-empty.
|
int[] |
returnStates
Sorted for merge, no duplicates; if present,
EMPTY_FULL_RETURN_STATE is always first
|
cachedHashCode, EMPTY, EMPTY_RETURN_STATE, globalNodeCount, id| Constructor and Description |
|---|
ArrayPredictionContext(PredictionContext[] parents,
int[] returnStates) |
ArrayPredictionContext(SingletonPredictionContext a) |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
calculateHashCode(PredictionContext[] parents,
int[] returnStates) |
protected static int |
calculateParentHashCode(PredictionContext[] parents) |
protected static int |
calculateReturnStatesHashCode(int[] returnStates) |
boolean |
equals(Object o) |
PredictionContext |
getParent(int index) |
int |
getReturnState(int index) |
boolean |
isEmpty()
This means only the EMPTY context is in set
|
Iterator<SingletonPredictionContext> |
iterator() |
int |
size() |
String |
toString() |
calculateHashCode, combineCommonParents, compareTo, fromRuleContext, getAllContextNodes_, getAllContextNodes, getCachedContext, hasEmptyPath, hashCode, merge, mergeArrays, mergeRoot, mergeSingletons, toDOTString, toString, toString, toStrings, toStringspublic final PredictionContext[] parents
public final int[] returnStates
public ArrayPredictionContext(SingletonPredictionContext a)
public ArrayPredictionContext(PredictionContext[] parents, int[] returnStates)
protected static int calculateHashCode(PredictionContext[] parents, int[] returnStates)
protected static int calculateParentHashCode(PredictionContext[] parents)
protected static int calculateReturnStatesHashCode(int[] returnStates)
public Iterator<SingletonPredictionContext> iterator()
iterator in interface Iterable<SingletonPredictionContext>iterator in class PredictionContextpublic boolean isEmpty()
PredictionContextisEmpty in class PredictionContextpublic int size()
size in class PredictionContextpublic PredictionContext getParent(int index)
getParent in class PredictionContextpublic int getReturnState(int index)
getReturnState in class PredictionContextCopyright © 2012. All Rights Reserved.