@Override public boolean equals(Object obj) { if (obj instanceof SharedBufferEdge) { @SuppressWarnings("unchecked") SharedBufferEdge<K, V> other = (SharedBufferEdge<K, V>) obj; if (version.equals(other.version)) { if (target == null && other.target == null) { return true; } else if (target != null && other.target != null) { return target.getKey().equals(other.target.getKey()) && target.getValueTime().equals(other.target.getValueTime()); } else { return false; } } else { return false; } } else { return false; } }