|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lexonics.edsel.Edge
An Edsel edge.
An Edge has a source, a name, and a destination list.
The source is a non-null Node.
The name is a valid Edsel identifier;
that is, it is a non-null, non-empty String
that contains no characters other than
upper- and lowercase ASCII letters, digits, and hyphens.
Names beginning with hyphens are reserved.
By convention, edge names are lowercase words
separated by hyphens.
The destination list is a non-null List of Nodes.
Edges are immutable.
| Constructor Summary | |
Edge(Node source,
String name,
List destinationList)
Construct an Edge with a given source, name, and destination list. |
|
Edge(Node source,
String name,
Node destination)
Construct an Edge with a given source and name, and a destination list containing a single destination. |
|
| Method Summary | |
List |
destinationList()
Return a shallow copy of the destination list of this Edge. |
boolean |
equals(Object o)
Compare a given object with this Edge for equality. |
int |
hashCode()
Return the hash code value for this Edge. |
String |
name()
Return the name of this Edge. |
Node |
source()
Return the source of this Edge. |
String |
toString()
Return a string representation of this Edge. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Edge(Node source,
String name,
Node destination)
source - The source. Must be non-null.name - The name. Must be a valid Edsel identifier.destination - The destination. Must be non-null.
IllegalArgumentException - The source is null,
the name is not a valid Edsel identifier, or the destination is null.
public Edge(Node source,
String name,
List destinationList)
source - The source. Must be non-null.name - The name. Must be a valid Edsel identifier.destinationList - The destination list.
Must be a non-null List of Nodes.
This list is copied by a shallow copy, to guarantee Edge immutability.
IllegalArgumentException - The source is null,
the name is not a valid Edsel identifier,
the destination list is null,
or an element of the destination list is not a Node.| Method Detail |
public List destinationList()
public boolean equals(Object o)
true if the given object is also an Edge,
and the two Edges have equal sources, names, and destination lists.
o - The object.
true if the object is equal to this Edge.public int hashCode()
public String name()
public Node source()
public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||