public class Path
extends Object
Modifier and Type | Field and Description |
---|---|
(package private) ArrayList<GNode> |
path |
Constructor and Description |
---|
Path() |
Modifier and Type | Method and Description |
---|---|
void |
addToPath(BinaryTuple bt) |
void |
addToPath(Concept c)
Add the concept to the end of the path.
|
Path |
clone() |
boolean |
contains(Concept concept) |
boolean |
cycleSame(Path otherPath)
Determine whether this path is equivalent to the given path if they are cycles.
|
boolean |
equals(Path otherPath)
Compares two paths for equality as follows.
|
GNode |
firstNode() |
boolean |
isCycle() |
boolean |
isEmpty() |
boolean |
isPathBetweenTerminals() |
GNode |
lastNode() |
int |
length()
How many concepts and relations are in the path.
|
String |
toString()
Show the path as a string of the form
"Cat - sits-on - Mat - has-attribute - Colour: Grey |
ArrayList<GNode> path
public boolean contains(Concept concept)
public void addToPath(Concept c)
c
- concept to be added.public void addToPath(BinaryTuple bt)
public boolean isEmpty()
public GNode firstNode()
public GNode lastNode()
public boolean isCycle()
public Path clone()
clone
in class Object
public String toString()
"Cat - sits-on - Mat - has-attribute - Colour: Grey
toString
in class Object
public int length()
public boolean isPathBetweenTerminals()
public boolean equals(Path otherPath)
otherPath
- public boolean cycleSame(Path otherPath)
otherPath
-