if (!thisPair.equals(thatPair)) return false;
if (!thisPair.equals(thatPair)) return false;
@Override public boolean equals(Object arg0) { if (arg0 instanceof ONDEXMetaRelation) return super.equals(arg0) && this.pair.equals(((ONDEXMetaRelation) arg0).pair); else return super.equals(arg0); }
if (!endpoints.equals(edge_vpairs.get(e))) throw new IllegalArgumentException("Tree already includes edge" + e + " with different endpoints " + edge_vpairs.get(e));
if (!endpoints.equals(edge_vpairs.get(e))) throw new IllegalArgumentException("Tree already includes edge" + e + " with different endpoints " + edge_vpairs.get(e));
if (!endpoints.equals(edge_vpairs.get(e))) { throw new IllegalArgumentException("Tree already includes edge" + e + " with different endpoints "
if (!endpoints.equals(edge_vpairs.get(e))) throw new IllegalArgumentException("Tree already includes edge" + e + " with different endpoints " + edge_vpairs.get(e));
protected Pair<V> getValidatedEndpoints(E edge, Pair<? extends V> endpoints) { if (edge == null) throw new IllegalArgumentException("input edge may not be null"); if (endpoints == null) throw new IllegalArgumentException("endpoints may not be null"); Pair<V> new_endpoints = new Pair<V>(endpoints.getFirst(), endpoints.getSecond()); if (containsEdge(edge)) { Pair<V> existing_endpoints = getEndpoints(edge); if (!existing_endpoints.equals(new_endpoints)) { throw new IllegalArgumentException("edge " + edge + " already exists in this graph with endpoints " + existing_endpoints + " and cannot be added with endpoints " + endpoints); } else { return null; } } return new_endpoints; }
protected Pair<V> getValidatedEndpoints(E edge, Pair<? extends V> endpoints) { if (edge == null) { throw new IllegalArgumentException("input edge may not be null"); } if (endpoints == null) { throw new IllegalArgumentException("endpoints may not be null"); } Pair<V> new_endpoints = new Pair<V>(endpoints.getFirst(), endpoints.getSecond()); if (containsEdge(edge)) { Pair<V> existing_endpoints = getEndpoints(edge); if (!existing_endpoints.equals(new_endpoints)) { throw new IllegalArgumentException("edge " + edge + " already exists in this graph with endpoints " + existing_endpoints + " and cannot be added with endpoints " + endpoints); } return null; } return new_endpoints; }