@Override public int compareTo(BoundValue o) { if (!comparator.equals(o.comparator)) { throw new ISE("WTF?! Comparator mismatch?!"); } return comparator.compare(value, o.value); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BoundValue that = (BoundValue) o; if (value != null ? !value.equals(that.value) : that.value != null) { return false; } return comparator != null ? comparator.equals(that.comparator) : that.comparator == null; }
@Override public int hashCode() { int result = value != null ? value.hashCode() : 0; result = 31 * result + (comparator != null ? comparator.hashCode() : 0); return result; }