gr.james.simplegraph.BaseEdge Maven / Gradle / Ivy
Show all versions of simple-graph Show documentation
package gr.james.simplegraph;
interface BaseEdge {
/**
* Indicates whether some other object is equal to this edge.
*
* Two edges are equal if they are of the same type, represent the same graph connection and have the same weight
* (if they are weighted).
*
* Complexity: O(1)
*
* @param obj the reference object with which to compare
* @return {@code true} if this edge is equal to the {@code obj} argument, otherwise {@code false}
*/
@Override
boolean equals(Object obj);
/**
* Returns a hash code value for this edge.
*
* Complexity: O(1)
*
* @return a hash code value for this edge
*/
@Override
int hashCode();
/**
* Returns a string representation of this edge.
*
* Complexity: O(1)
*
* @return a string representation of this edge
*/
@Override
String toString();
}