|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjlink.flowchart.graph.JLEdgeSet
public class JLEdgeSet
The complete set of edges used in a JLGraph is modelled using this class. JLEdgeSet
is as its name suggests a set of edges and methods to manipulate and search the set.
| Field Summary | |
|---|---|
protected java.util.LinkedList<JLEdge> |
edgeSet
The inner data model of JLEdgeSet is a linked list with a JLEdge generic
value. |
| Constructor Summary | |
|---|---|
JLEdgeSet()
Creates a new instance of JLEdgeSet with a blank inner linked list. |
|
JLEdgeSet(java.util.LinkedList<JLEdge> edges)
Constructor to init this JLEdgeSet with the internal structure from another JLEdgeSet. |
|
| Method Summary | |
|---|---|
void |
appendJLEdge(JLEdge e)
Adds this JLEdge to the JLEdgeSet so that it can be included in the model. |
JLEdge |
getJLEdge(int edgeID)
Query the JLEdgeSet for a JLEdge with this edge ID. |
JLEdge |
getJLEdge(int headVertexID,
int tailVertexID)
Query the JLEdgeSet for the first edge with the matching head and tail vertex IDs |
JLEdge |
getJLEdge(JLVertex vertex,
int vertexType)
Returns the first matching JLEdge that has this particular JLVertex
as either a head or tail vertex. |
JLEdge |
getJLEdge(JLVertex headVertex,
JLVertex tailVertex)
Queries the JLEdgeSet for the first occurrence of a JLEdge with
head and tail vertices matching the input parameters. |
JLEdge |
getJLEdge(java.lang.String edgeName)
Searches the JLEdgeSet for the first occurrence of a JLEdge who has
a name equal to the parameter. |
JLEdge |
getJLEdge(java.lang.String vertexName,
int vertexType)
Return the first JLEdge with a vertex (either head or tail) that has this name. |
JLEdge |
getJLEdge(java.lang.String headVertexName,
java.lang.String tailVertexName)
Query the JLEdgeSet for the first edge with the matching head and tail vertex names |
int |
getJLEdgeCount()
Get the number of edges in this JLEdgeSet |
JLEdgeSet |
getJLEdges(int headVertexID,
int tailVertexID)
Query the JLEdgeSet for all edges with the matching head and tail vertex IDs |
JLEdgeSet |
getJLEdges(JLVertex vertex,
int vertexType)
Returns a JLEdgeSet with all the edges that have this particular JLVertex
as either a head or tail vertex. |
JLEdgeSet |
getJLEdges(JLVertex headVertex,
JLVertex tailVertex)
Query the JLEdgeSet for all edges with the matching head and tail vertices. |
JLEdgeSet |
getJLEdges(java.lang.String edgeName)
Returns all edges with the given edge name. |
JLEdgeSet |
getJLEdges(java.lang.String vertexName,
int vertexType)
Return all JLEdge objects with a vertex (either head or tail) that has this name. |
JLEdgeSet |
getJLEdges(java.lang.String headVertexName,
java.lang.String tailVertexName)
Query the JLEdgeSet for all edges with the matching head and tail vertex names |
java.util.LinkedList<JLEdge> |
getLinkedList()
Use this method to get the inner linked list of JLEdgeSet if you need it to mirror in
another JLGraph for instance. |
void |
mirrorJLEdgeSet(java.util.LinkedList<JLEdge> edges)
This will make the internal linked list the same as the provided linked list so as to copy the internal data structure of another JLGraph. |
void |
removeJLEdge(int edgeID)
Removes the specified JLEdge from this JLEdgeSet using the unique edge ID. |
void |
removeJLEdge(JLEdge e)
Removes this JLEdge from this JLEdgeSet. |
void |
removeJLEdges(JLVertex vertex)
Removes all JLEdge objects in this JLEdgeSet that have this JLVertex
as either a head OR a tail vertex. |
void |
removeJLEdges(JLVertex vertex,
int vertexType)
Removes all edges that possess this JLVertex as either a head or tail vertex. |
void |
removeJLEdges(JLVertex headVertex,
JLVertex tailVertex)
Removes all JLEdge objects from JLEdgeSet that have both the head and tail
vertices in common. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.LinkedList<JLEdge> edgeSet
JLEdgeSet is a linked list with a JLEdge generic
value. All accessor methods manipulate this structure in a safe and intuitive manner rather than
the standard interfaces linked list provides. While you still can access and write over this inner
model, it is advised against as the accessor methods make mores sense with respect to the API and
are safer.
mirrorJLEdgeSet(LinkedList edges),
getLinkedList()| Constructor Detail |
|---|
public JLEdgeSet()
JLEdgeSet with a blank inner linked list.
edgeSetpublic JLEdgeSet(java.util.LinkedList<JLEdge> edges)
JLEdgeSet with the internal structure from another JLEdgeSet.
edges - The externally provided JLEdgeSet to be used in this JLEdgeSet.edgeSet| Method Detail |
|---|
public void mirrorJLEdgeSet(java.util.LinkedList<JLEdge> edges)
JLGraph.
edges - The externally provided linked list to set the JLEdgeSet to.getLinkedList(),
edgeSetpublic java.util.LinkedList<JLEdge> getLinkedList()
JLEdgeSet if you need it to mirror in
another JLGraph for instance. While it is possible to edit this list and "mirror" it back
into the JLEdgeSet, this is advised against. Use general purpose constructors to alter
the internal data structure as this is safer.
JLEdgeSetmirrorJLEdgeSet(LinkedList edges),
edgeSet
public void appendJLEdge(JLEdge e)
throws DuplicateJLEdgeException
JLEdge to the JLEdgeSet so that it can be included in the model.
e - The JLEdge to be added.
DuplicateJLEdgeException - If a duplicate edge ID is found (but not if a duplicate edge is found ie. same head a tail vertices but not the same ID).public void removeJLEdge(JLEdge e)
JLEdge from this JLEdgeSet.
e - The JLEdge to be removed.public void removeJLEdge(int edgeID)
JLEdge from this JLEdgeSet using the unique edge ID.
edgeID - The JLEdge unique ID that will be removed from this set.public void removeJLEdges(JLVertex vertex)
JLEdge objects in this JLEdgeSet that have this JLVertex
as either a head OR a tail vertex.
vertex - If a JLEdge connects with this JLVertex it will be removed.
public void removeJLEdges(JLVertex headVertex,
JLVertex tailVertex)
JLEdge objects from JLEdgeSet that have both the head and tail
vertices in common.
headVertex - The JLVertex that is the head vertex.tailVertex - The JLVertex that is the tail vertex.
public void removeJLEdges(JLVertex vertex,
int vertexType)
JLVertex as either a head or tail vertex.
vertex - The JLVertex to match against in the JLEdgeSetvertexType - either JLEdge.VERTEX_HEAD or JLEdge.VERTEX_TAILpublic JLEdge getJLEdge(int edgeID)
JLEdgeSet for a JLEdge with this edge ID.
edgeID - The unique JLEdge identification number to search for.
JLEdge with this unique ID. Returns null if no edge is found.
public JLEdge getJLEdge(JLVertex headVertex,
JLVertex tailVertex)
JLEdgeSet for the first occurrence of a JLEdge with
head and tail vertices matching the input parameters. This method will return only the first
occurrence of JLEdge matching these parameters. Consider using getJLEdges(JLVertex headVertex, JLVertex tailVertex)
if you suspect there is more than one occurrence of a JLEdge meeting these conditions. This
alternative method returns a JLEdgeSet that can be recursively searched further.
headVertex - The head JLVertex to search for.tailVertex - The tail JLVertex to search for.
JLEdge matching the head JLVertex and tail JLVertex. Returns null if no matches are found.public JLEdge getJLEdge(java.lang.String edgeName)
JLEdgeSet for the first occurrence of a JLEdge who has
a name equal to the parameter.
edgeName - The name to search against all edges in the JLEdgeSet
JLEdge or null if no matches were found.
public JLEdge getJLEdge(int headVertexID,
int tailVertexID)
JLEdgeSet for the first edge with the matching head and tail vertex IDs
headVertexID - Unique ID for the head JLVertex.tailVertexID - Unique ID for the tail JLVertex.
null if no matching edges.
public JLEdge getJLEdge(java.lang.String headVertexName,
java.lang.String tailVertexName)
JLEdgeSet for the first edge with the matching head and tail vertex names
headVertexName - The name for the head JLVertex.tailVertexName - The name for the tail JLVertex.
null if no matching edges.
public JLEdge getJLEdge(java.lang.String vertexName,
int vertexType)
JLEdge with a vertex (either head or tail) that has this name.
vertexName - The JLVertex name to query all edges with.vertexType - Either JLEdge.VERTEX_HEAD or JLEdge.VERTEX_TAIL
JLEdge containing the first matched edge or null if no matches.
public JLEdge getJLEdge(JLVertex vertex,
int vertexType)
JLEdge that has this particular JLVertex
as either a head or tail vertex.
vertex - The JLVertex to query all edges against.vertexType - Either JLEdge.VERTEX_HEAD or JLEdge.VERTEX_TAIL
JLEdge containing the first matched edge or null if no matches.
public JLEdgeSet getJLEdges(JLVertex headVertex,
JLVertex tailVertex)
JLEdgeSet for all edges with the matching head and tail vertices.
headVertex - The head JLVertex to search for matching edges (JLEdge)tailVertex - The tail JLVertex to search for matching edges (JLEdge)
JLEdgeSet containing the matched edges.
public JLEdgeSet getJLEdges(int headVertexID,
int tailVertexID)
JLEdgeSet for all edges with the matching head and tail vertex IDs
headVertexID - Unique ID for the head JLVertex.tailVertexID - Unique ID for the tail JLVertex.
JLEdgeSet containing the matched edges.
public JLEdgeSet getJLEdges(java.lang.String headVertexName,
java.lang.String tailVertexName)
JLEdgeSet for all edges with the matching head and tail vertex names
headVertexName - Name for the head JLVertex.tailVertexName - Name for the tail JLVertex.
JLEdgeSet containing the matched edges.public JLEdgeSet getJLEdges(java.lang.String edgeName)
edgeName - The JLEdgeSet with all matched edges.
JLEdgeSet containing the matched edges.
public JLEdgeSet getJLEdges(java.lang.String vertexName,
int vertexType)
JLEdge objects with a vertex (either head or tail) that has this name.
vertexName - The JLVertex name to query all edges with.vertexType - Either JLEdge.VERTEX_HEAD or JLEdge.VERTEX_TAIL
JLEdgeSet containing the matched edges.
public JLEdgeSet getJLEdges(JLVertex vertex,
int vertexType)
JLEdgeSet with all the edges that have this particular JLVertex
as either a head or tail vertex.
vertex - The JLVertex to query all edges against.vertexType - Either JLEdge.VERTEX_HEAD or JLEdge.VERTEX_TAIL
JLEdgeSet containing the matched edges.public int getJLEdgeCount()
JLEdgeSet
JLEdge count for this JLEdgeSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||