|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Edge<V>
/** As implied by its name, this interface models the mathematical edge abstraction, which can be viewed as an undirected link. The Edge interface places additional stipulations, beyond those inherited from the Link interface, on the contracts of equals and hashCode methods.
The additional stipulations on the equals method is the following. Let e1 and e2 two Edge objects. The method invocation e1.equals(e2) returns true only if e1.contains(e2.toArray()[0]) && e1.contains(e2.toArray()[1]). It should be noted that two edges composed by the same vertices can be different (which is allowed to happen in multi-graphs, for example).
Note that it is generally necessary to override the hashCode method whenever the equals method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.
Method Summary |
---|
Methods inherited from interface fr.inria.opengve.bridge.interfaces.Link |
---|
contains, getOpposite, isLoop, leadsTo, leavesFrom, toArray, toArray |
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |