@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Entry other = (Entry) obj; if (this.value != other.value) { return false; } if (this.key != other.key && (this.key == null || !this.key.equals(other.key))) { return false; } return true; } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Entry other = (Entry) obj; if (this.value != other.value) { return false; } if (this.key != other.key && (this.key == null || !this.key.equals(other.key))) { return false; } return true; } }
return false; if (this.interval != obj.interval && (this.interval == null || !this.interval.equals(obj.interval))) { return false;
return false; if (this.interval != obj.interval && (this.interval == null || !this.interval.equals(obj.interval))) { return false;
private Node findNode(Node z, Interval i) { if (z != null) { if (z.i != null && z.i.equals(i)) { return z; } else if (z.i == null) { return null; } boolean cmp = compareLow(i, z.i); if (z.left != null && cmp && i.getHigh() <= z.left.max) { Node r = findNode(z.left, i); if (r != null) { return r; } } if (z.right != null && !cmp && i.getHigh() <= z.right.max) { Node r = findNode(z.right, i); if (r != null) { return r; } } } return null; }
private Node findNode(Node z, Interval i) { if (z != null) { if (z.i != null && z.i.equals(i)) { return z; } else if (z.i == null) { return null; } boolean cmp = compareLow(i, z.i); if (z.left != null && cmp && i.getHigh() <= z.left.max) { Node r = findNode(z.left, i); if (r != null) { return r; } } if (z.right != null && !cmp && i.getHigh() <= z.right.max) { Node r = findNode(z.right, i); if (r != null) { return r; } } } return null; }