cachedHashCode property
Stores the computed hash code of this PredictionContext. The hash code is computed in parts to match the following reference algorithm.
int referenceHashCode() { int hash = {@link MurmurHash#initialize MurmurHash.initialize}({@link #INITIAL_HASH}); for (int i = 0; i < {@link #size()}; i++) { hash = {@link MurmurHash#update MurmurHash.update}(hash, {@link #getParent getParent}(i)); } for (int i = 0; i < {@link #size()}; i++) { hash = {@link MurmurHash#update MurmurHash.update}(hash, {@link #getReturnState getReturnState}(i)); } hash = {@link MurmurHash#finish MurmurHash.finish}(hash, 2 * {@link #size()}); return hash; }
Implementation
final int cachedHashCode;