private int calculateHash() { final int prime = 31; int result = 1; result = prime * result + object.hashCode(); result = prime * result + predicate.hashCode(); return result; }
@Override public boolean equals(final Object obj) { if (!(obj instanceof HalfStatement)) { return false; } if (hash != obj.hashCode()) { return false; } final HalfStatement other = (HalfStatement) obj; if (!object.equals(other.getObject())) { return false; } if (!predicate.equals(other.getPredicate())) { return false; } return true; }