|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjlink.flowchart.graph.JLVertexSet
public class JLVertexSet
The complete set of vertices used in a JLGraph
is modelled using this class. JLVertexSet
is as its name suggests a set of vertices and methods to manipulate and search the set.
Field Summary | |
---|---|
protected java.util.LinkedList<JLVertex> |
vertexSet
The internal model of the JLVertexSet is a linked list. |
Constructor Summary | |
---|---|
JLVertexSet()
Creates a JLVertexSet with a blank inner linked list. |
|
JLVertexSet(java.util.LinkedList<JLVertex> vertices)
Creates a JLVertexSet with an externally provided linked list to copy another
JLVertexSet |
Method Summary | |
---|---|
void |
appendJLVertex(JLVertex v)
Adds a JLVertex to this JLVertexSet . |
JLVertex |
getJLVertex(int vertexID)
Get the JLVertex with matching unique vertex ID. |
int |
getJLVertexCount()
Determine the number of JLVertex objects in the JLVertexSet . |
JLVertexSet |
getJLVertices(java.lang.String vertexName)
Get all JLVertex objects in the JLVertexSet that have the corresponding
vertex name. |
java.util.LinkedList<JLVertex> |
getLinkedList()
Accessor method for the internal data model of JLVertexSet . |
void |
mirrorJLVertexSet(java.util.LinkedList<JLVertex> vertices)
Copies the provided linked list to the JLVertexSet internally stored linked list to use
as the data model. |
void |
removeJLVertex(int vertexID)
Removes the JLVertex with the unique vertex ID that matches the parameter. |
void |
removeJLVertex(JLVertex v)
Removes this JLVertex . |
void |
removeJLVertices(java.lang.String vertexName)
Removes all JLVertex objects who have the matching vertex name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.LinkedList<JLVertex> vertexSet
JLVertexSet
is a linked list. While there are methods
to manipulate this list directly, this is advised against as the class accessor methods are more
meaningful and safer to use.
mirrorJLVertexSet(LinkedList vertices)
,
getLinkedList()
Constructor Detail |
---|
public JLVertexSet()
JLVertexSet
with a blank inner linked list.
vertexSet
public JLVertexSet(java.util.LinkedList<JLVertex> vertices)
JLVertexSet
with an externally provided linked list to copy another
JLVertexSet
vertices
- The externally provided vertices to use.Method Detail |
---|
public void mirrorJLVertexSet(java.util.LinkedList<JLVertex> vertices)
JLVertexSet
internally stored linked list to use
as the data model. This can be used when trying to copy another JLGraph
structure into a
new JLGraph
.
vertices
- The linked list to model this JLVertexSet
on.public java.util.LinkedList<JLVertex> getLinkedList()
JLVertexSet
. While this is able to assist
in directly manipulating the internal model, it is advised against. Use the API methods to safely
manipulate this model. Use this method if you wish to get the model to copy to another
JLGraph
.
public void appendJLVertex(JLVertex v) throws DuplicateJLVertexException
JLVertex
to this JLVertexSet
.
v
- The JLVertex
to add.
DuplicateJLVertexException
- If there is a duplicate JLVertex
.public void removeJLVertex(JLVertex v)
JLVertex
.
v
- The JLVertex
to remove.public void removeJLVertex(int vertexID)
JLVertex
with the unique vertex ID that matches the parameter.
vertexID
- The unique vertex ID to remove the corresponding JLVertex
.public void removeJLVertices(java.lang.String vertexName)
JLVertex
objects who have the matching vertex name.
vertexName
- All JLVertex
objects with this name will be removed.public JLVertex getJLVertex(int vertexID)
JLVertex
with matching unique vertex ID.
vertexID
- The unique vertex ID.
JLVertex
matching this ID else null
if none were found.public JLVertexSet getJLVertices(java.lang.String vertexName)
JLVertex
objects in the JLVertexSet
that have the corresponding
vertex name.
vertexName
- The vertex name to search against the JLVertex
objects.
JLVertexSet
with all matching JLVertex
objects.public int getJLVertexCount()
JLVertex
objects in the JLVertexSet
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |