Package casa.lepton
Class OppEdgeFactory
java.lang.Object
casa.lepton.OppEdgeFactory
- All Implemented Interfaces:
org.graphstream.graph.EdgeFactory<OppEdge>
Class used to dynamically create
OppEdge
instances. The
newInstance(String, Node, Node, boolean)
method is called by the
Graph.addEdge(String, Node, Node)
method.
Setters (setConnectivityType(String)
, setStatus(String)
)
allow to set the edge properties for subsequent creations-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmakeEdgeId
(String id1, String id2, String connectivityType) Give a unique edge id from the given nodes ids and connectivityType in the form "id1-id2:type" where id1 strictly lower than id2.makeEdgeId
(org.graphstream.graph.Node src, org.graphstream.graph.Node dst, String connectivityType) Give a unique edge id from the given nodes ids and connectivityType in the form "id1-id2:type" where id1 strictly lower than id2.newInstance
(String id, org.graphstream.graph.Node src, org.graphstream.graph.Node dst, boolean directed) Create aOppEdge
instance.void
setConnectivityType
(String connectivityType) Set the connectivity type for the subsequent object creations.void
Set the edge status for the subsequent object creations.
-
Constructor Details
-
OppEdgeFactory
Constructor.- Parameters:
props
- the default edge properties
-
-
Method Details
-
newInstance
public OppEdge newInstance(String id, org.graphstream.graph.Node src, org.graphstream.graph.Node dst, boolean directed) Create aOppEdge
instance.- Specified by:
newInstance
in interfaceorg.graphstream.graph.EdgeFactory<OppEdge>
- Parameters:
id
- unique edge id.src
- the source node.dst
- the target node.directed
- not used.- Returns:
- the new edge
-
setConnectivityType
Set the connectivity type for the subsequent object creations.- Parameters:
connectivityType
-
-
setStatus
Set the edge status for the subsequent object creations.- Parameters:
status
-
-
makeEdgeId
public String makeEdgeId(org.graphstream.graph.Node src, org.graphstream.graph.Node dst, String connectivityType) Give a unique edge id from the given nodes ids and connectivityType in the form "id1-id2:type" where id1 strictly lower than id2.- Parameters:
src
- a node.dst
- other node.connectivityType
- the connectivity type.- Returns:
- unique edge id.
-
makeEdgeId
Give a unique edge id from the given nodes ids and connectivityType in the form "id1-id2:type" where id1 strictly lower than id2.- Parameters:
id1
- a node id.id2
- other node id.connectivityType
- the connectivity type.- Returns:
- unique edge id.
-