@Override public int hashCode() { int result = hashFunction != null ? hashFunction.hashCode() : 0; result = 31 * result + numSegments; return result; }