|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.myra.framework.Trail
net.sf.myra.framework.DefaultTrail
public class DefaultTrail
Default Trail
implementation that contains no duplicate
vertices.
Constructor Summary | |
---|---|
DefaultTrail()
Creates a new DefaultTrail instance. |
Method Summary | |
---|---|
void |
add(Vertex<?> vertex)
Adds a node to the trail. |
DefaultTrail |
clone()
Creates and returns a copy of this trail instance. |
boolean |
equals(java.lang.Object o)
|
Vertex<?> |
getLast()
Returns the last added (visited) vertex. |
java.util.Collection<Vertex<?>> |
getVertices()
Returns the vertices of this trail. |
boolean |
isEmpty()
Checks if this trail is empty. |
void |
remove(Vertex<?> vertex)
Removes the specified vertex. |
Methods inherited from class net.sf.myra.framework.Trail |
---|
getCost, getIteration, getSize, setCost, setIteration, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultTrail()
DefaultTrail
instance.
Method Detail |
---|
public void add(Vertex<?> vertex)
Trail
add
in class Trail
vertex
- the vertex to be added.public void remove(Vertex<?> vertex)
Trail
remove
in class Trail
vertex
- the vertex to remove.public java.util.Collection<Vertex<?>> getVertices()
Trail
getVertices
in class Trail
public Vertex<?> getLast()
Trail
getLast
in class Trail
public boolean isEmpty()
Trail
isEmpty
in class Trail
true
if this trail hasn't vertices associated;
false
otherwise.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public DefaultTrail clone()
Trail
clone
in class Trail
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |