javautils.graph.testing
Class BasicEdge
java.lang.Object
|
+--javautils.ImmutablePair
|
+--javautils.graph.testing.BasicEdge
- All Implemented Interfaces:
- java.util.Map.Entry
- public final class BasicEdge
- extends ImmutablePair
A basic implementation of an edge.
Constructor Summary |
BasicEdge(java.lang.Object source,
java.lang.Object target,
int key)
|
Method Summary |
boolean |
equals(java.lang.Object other)
True if and only if
the other object is not-null and
this and the other object have the same class and
the first fields of this and the other pair are both null or both equal and
the second fields of this and the other pair are both null or both equal. |
int |
hashCode()
The hashCode is designed to be asymmetric, so that
generally new ImmutablePair(a,b) ! |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
BasicEdge
public BasicEdge(java.lang.Object source,
java.lang.Object target,
int key)
hashCode
public int hashCode()
- Description copied from class:
ImmutablePair
The hashCode is designed to be asymmetric, so that
generally new ImmutablePair(a,b) != new
ImmutablePair(b,a)
.
- Specified by:
hashCode
in interface java.util.Map.Entry
- Overrides:
hashCode
in class ImmutablePair
equals
public boolean equals(java.lang.Object other)
- Description copied from class:
ImmutablePair
True if and only if
- the other object is not-null and
- this and the other object have the same class and
- the first fields of this and the other pair are both null or both equal and
- the second fields of this and the other pair are both null or both equal.
- Specified by:
equals
in interface java.util.Map.Entry
- Overrides:
equals
in class ImmutablePair
toString
public java.lang.String toString()
- Overrides:
toString
in class ImmutablePair