@Override public int compareTo(final BytesReference other) { return compareIterators(this, other, (a, b) -> a.compareTo(b)); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof BytesReference) { final BytesReference otherRef = (BytesReference) other; if (length() != otherRef.length()) { return false; } return compareIterators(this, otherRef, (a, b) -> a.bytesEquals(b) ? 0 : 1 // this is a call to BytesRef#bytesEquals - this method is the hot one in the comparison ) == 0; } return false; }
@Override public int compareTo(final BytesReference other) { return compareIterators(this, other, (a, b) -> a.compareTo(b)); }
@Override public int compareTo(final BytesReference other) { return compareIterators(this, other, (a, b) -> a.compareTo(b)); }
@Override public int compareTo(final BytesReference other) { return compareIterators(this, other, (a, b) -> a.compareTo(b)); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof BytesReference) { final BytesReference otherRef = (BytesReference) other; if (length() != otherRef.length()) { return false; } return compareIterators(this, otherRef, (a, b) -> a.bytesEquals(b) ? 0 : 1 // this is a call to BytesRef#bytesEquals - this method is the hot one in the comparison ) == 0; } return false; }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof BytesReference) { final BytesReference otherRef = (BytesReference) other; if (length() != otherRef.length()) { return false; } return compareIterators(this, otherRef, (a, b) -> a.bytesEquals(b) ? 0 : 1 // this is a call to BytesRef#bytesEquals - this method is the hot one in the comparison ) == 0; } return false; }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof BytesReference) { final BytesReference otherRef = (BytesReference) other; if (length() != otherRef.length()) { return false; } return compareIterators(this, otherRef, (a, b) -> a.bytesEquals(b) ? 0 : 1 // this is a call to BytesRef#bytesEquals - this method is the hot one in the comparison ) == 0; } return false; }