|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.cke.graph.RelationList
Field Summary | |
protected java.util.Vector |
relations
List of vertices. |
Constructor Summary | |
RelationList()
No-arg constructor; creates the vector to hold the list of vertices. |
|
RelationList(VisualRelation[] relList)
creates the vector to hold the list of relations. |
Method Summary | |
void |
add(VisualRelation edge)
Add a new VisualRelation to this list. |
void |
clear()
Removes all of the relations from the list. |
java.lang.Object |
clone()
Creates a shallow copy of this VisualRelation list, cloning the list of the relations into the new object. |
RelationList |
copy()
Makes a deep copy of this relation list, cloning each of the vertices in the list. |
RelationList |
find(VisualEntity v)
Returns all the edges that are connected to the given vertex. |
VisualRelation |
get(int index)
Get the VisualRelation stored at the specified index in the list. |
int |
indexOf(VisualRelation edge)
Find the index of the element in the list. |
void |
join(RelationList list)
Combines the elements from list into this
list of relations. |
boolean |
remove(int edgeToRemove)
Removes the specified element from the list given the index of the VisualRelation within the list. |
boolean |
remove(VisualRelation edgeToRemove)
Removes the specified element from the list given the VisualRelation itself. |
int |
size()
Returns the size of the relation list. |
boolean |
verify()
Error-checking method that verifies the data and structure of the vertex list object. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector relations
Constructor Detail |
public RelationList()
public RelationList(VisualRelation[] relList)
Method Detail |
public void add(VisualRelation edge)
public void clear()
public java.lang.Object clone()
public RelationList copy()
public VisualRelation get(int index)
index
- number of the nth VisualRelation to get (0-based)
public int indexOf(VisualRelation edge)
public void join(RelationList list)
list
into this
list of relations. Relations in list
will only
be added if there is nothing similar in our list.
list
- list of vertices to addpublic boolean remove(VisualRelation edgeToRemove)
edgeToRemove
- VisualRelation to remove from list
public boolean remove(int edgeToRemove)
edgeToRemove
- index of VisualRelation to remove from list
public RelationList find(VisualEntity v)
v
- vertex to find edges for
public int size()
public boolean verify()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |