@Override public boolean equals(@NullableDecl Object obj) { if (obj == this) { return true; } if (!(obj instanceof EndpointPair)) { return false; } EndpointPair<?> other = (EndpointPair<?>) obj; if (isOrdered() != other.isOrdered()) { return false; } return source().equals(other.source()) && target().equals(other.target()); }
/** Returns an {@link EndpointPair} representing the endpoints of a directed edge. */ public static <N> EndpointPair<N> ordered(N source, N target) { return new Ordered<N>(source, target); }
/** Returns an {@link EndpointPair} representing the endpoints of a directed edge. */ public static <N> EndpointPair<N> ordered(N source, N target) { return new Ordered<N>(source, target); }
@Override public N target() { return nodeV(); }
@Override public boolean equals(@NullableDecl Object obj) { if (obj == this) { return true; } if (!(obj instanceof EndpointPair)) { return false; } EndpointPair<?> other = (EndpointPair<?>) obj; if (isOrdered() != other.isOrdered()) { return false; } return source().equals(other.source()) && target().equals(other.target()); }
@Override public boolean equals(@Nullable Object obj) { if (obj == this) { return true; } if (!(obj instanceof EndpointPair)) { return false; } EndpointPair<?> other = (EndpointPair<?>) obj; if (isOrdered() != other.isOrdered()) { return false; } return source().equals(other.source()) && target().equals(other.target()); }
@Override public N target() { return nodeV(); }
@Override public N source() { return nodeU(); }
@Override public N source() { return nodeU(); }
/** Returns an {@link EndpointPair} representing the endpoints of a directed edge. */ public static <N> EndpointPair<N> ordered(N source, N target) { return new Ordered<N>(source, target); }
@Override public N target() { return nodeV(); }
@Override public N source() { return nodeU(); }
@Override public boolean equals(@NullableDecl Object obj) { if (obj == this) { return true; } if (!(obj instanceof EndpointPair)) { return false; } EndpointPair<?> other = (EndpointPair<?>) obj; if (isOrdered() != other.isOrdered()) { return false; } return source().equals(other.source()) && target().equals(other.target()); }
@Override public N source() { return nodeU(); }