Class PrefixTransferGraph
java.lang.Object
org.scandroid.prefixtransfer.PrefixTransferGraph
- All Implemented Interfaces:
EdgeManager<InstanceKeySite>
,Graph<InstanceKeySite>
,NodeManager<InstanceKeySite>
,Iterable<InstanceKeySite>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEdge
(InstanceKeySite src, InstanceKeySite dst) void
add a node to this graphboolean
int
int
Return the number ofimmediate predecessor
nodes of nReturn anIterator
over the immediate predecessor nodes of nint
Return the number ofimmediate successor
nodes of this Node in the GraphReturn an Iterator over the immediate successor nodes of nboolean
hasEdge
(InstanceKeySite src, InstanceKeySite dst) iterator()
void
void
removeEdge
(InstanceKeySite src, InstanceKeySite dst) void
void
remove a node from this graphvoid
remove a node and all its incident edgesvoid
stream()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
sbuaMap
-
-
Constructor Details
-
PrefixTransferGraph
-
-
Method Details
-
removeNodeAndEdges
Description copied from interface:Graph
remove a node and all its incident edges- Specified by:
removeNodeAndEdges
in interfaceGraph<InstanceKeySite>
- Throws:
UnsupportedOperationException
- if the graph implementation does not allow removal
-
addNode
Description copied from interface:NodeManager
add a node to this graph- Specified by:
addNode
in interfaceNodeManager<InstanceKeySite>
-
containsNode
- Specified by:
containsNode
in interfaceNodeManager<InstanceKeySite>
- Returns:
- true iff the graph contains the specified node
-
getNumberOfNodes
public int getNumberOfNodes()- Specified by:
getNumberOfNodes
in interfaceNodeManager<InstanceKeySite>
- Returns:
- the number of nodes in this graph
-
iterator
- Specified by:
iterator
in interfaceIterable<InstanceKeySite>
- Specified by:
iterator
in interfaceNodeManager<InstanceKeySite>
- Returns:
- an
Iterator
of the nodes in this graph
-
stream
- Specified by:
stream
in interfaceNodeManager<InstanceKeySite>
- Returns:
- a
Stream
of the nodes in this graph
-
removeNode
Description copied from interface:NodeManager
remove a node from this graph- Specified by:
removeNode
in interfaceNodeManager<InstanceKeySite>
-
addEdge
- Specified by:
addEdge
in interfaceEdgeManager<InstanceKeySite>
-
getPredNodeCount
Description copied from interface:EdgeManager
Return the number ofimmediate predecessor
nodes of n- Specified by:
getPredNodeCount
in interfaceEdgeManager<InstanceKeySite>
- Returns:
- the number of immediate predecessors of n.
-
getPredNodes
Description copied from interface:EdgeManager
Return anIterator
over the immediate predecessor nodes of nThis method never returns
null
.- Specified by:
getPredNodes
in interfaceEdgeManager<InstanceKeySite>
- Returns:
- an
Iterator
over the immediate predecessor nodes of this Node.
-
getSuccNodeCount
Description copied from interface:EdgeManager
Return the number ofimmediate successor
nodes of this Node in the Graph- Specified by:
getSuccNodeCount
in interfaceEdgeManager<InstanceKeySite>
- Returns:
- the number of immediate successor Nodes of this Node in the Graph.
-
getSuccNodes
Description copied from interface:EdgeManager
Return an Iterator over the immediate successor nodes of nThis method never returns
null
.- Specified by:
getSuccNodes
in interfaceEdgeManager<InstanceKeySite>
- Returns:
- an Iterator over the immediate successor nodes of n
-
hasEdge
- Specified by:
hasEdge
in interfaceEdgeManager<InstanceKeySite>
-
removeAllIncidentEdges
- Specified by:
removeAllIncidentEdges
in interfaceEdgeManager<InstanceKeySite>
- Throws:
UnsupportedOperationException
-
removeEdge
public void removeEdge(InstanceKeySite src, InstanceKeySite dst) throws UnsupportedOperationException - Specified by:
removeEdge
in interfaceEdgeManager<InstanceKeySite>
- Throws:
UnsupportedOperationException
-
removeIncomingEdges
- Specified by:
removeIncomingEdges
in interfaceEdgeManager<InstanceKeySite>
- Throws:
UnsupportedOperationException
-
removeOutgoingEdges
- Specified by:
removeOutgoingEdges
in interfaceEdgeManager<InstanceKeySite>
- Throws:
UnsupportedOperationException
-