bcds.phison
Class Link

java.lang.Object
  extended by bcds.phison.Link
All Implemented Interfaces:
java.lang.Comparable

public class Link
extends java.lang.Object
implements java.lang.Comparable

Defines an edge class that can be used with SimGraph As it implements Comparable, instances of this class can be used with ordered collections.

Author:
Juan Segovia S.

Constructor Summary
Link()
           
 
Method Summary
 int compareTo(java.lang.Object b)
          Compares two Link objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Link

public Link()
Method Detail

compareTo

public int compareTo(java.lang.Object b)
Compares two Link objects. This is necessary (implement Comparable) so that a link can be put into ordered collections (for example). The compararison is based on what is returned by toString. It is assumed that the b is not null.

Note: this class has a natural ordering that is inconsistent with equals.

Specified by:
compareTo in interface java.lang.Comparable