@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		else if ( !(o instanceof ArrayPredictionContext) ) {
			return false;
		}

		if ( this.hashCode() != o.hashCode() ) {
			return false; // can't be same if hash is different
		}

		ArrayPredictionContext a = (ArrayPredictionContext)o;
		return Arrays.equals(returnStates, a.returnStates) &&
		       Arrays.equals(parents, a.parents);
	}
Sorted for merge, no duplicates; if present,
 {@link #EMPTY_RETURN_STATE} is always last.
runtime/Java/src/org/antlr/v4/runtime/atn/ArrayPredictionContext.java