Package org.planit.network.virtual
Class VirtualNetwork.ConnectoidEdges
- java.lang.Object
-
- org.planit.network.virtual.VirtualNetwork.ConnectoidEdges
-
- All Implemented Interfaces:
Iterable<ConnectoidEdge>
- Enclosing class:
- VirtualNetwork
public class VirtualNetwork.ConnectoidEdges extends Object implements Iterable<ConnectoidEdge>
Internal class for all Connectoid specific code
-
-
Constructor Summary
Constructors Constructor Description ConnectoidEdges()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectoidEdge
get(long id)
Get connectoid edge by idIterator<ConnectoidEdge>
iterator()
Collect the connectoid edges available through an iteratorprotected ConnectoidEdge
register(ConnectoidEdge connectoidEdge)
Add connectoid edge to the internal container If new connectoid edge overrides an existing connectoid edge , the removed connectoid edge is returnedCollection<ConnectoidEdge>
registerNew(Connectoid connectoid)
Create new connectoid edge to from a specified centroid to a specified nodeint
size()
Return number of connectoid edges on the network-
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
-
-
-
-
Method Detail
-
register
protected ConnectoidEdge register(ConnectoidEdge connectoidEdge)
Add connectoid edge to the internal container If new connectoid edge overrides an existing connectoid edge , the removed connectoid edge is returned- Parameters:
connectoidEdge
- the connectoid edge to be registered- Returns:
- connectoidEdge added
-
registerNew
public Collection<ConnectoidEdge> registerNew(Connectoid connectoid) throws PlanItException
Create new connectoid edge to from a specified centroid to a specified node- Parameters:
connectoid
- extract information from connectoid to create virtual connectoid edge- Returns:
- newly created connectoid edges (reference nodes not yet aware of connection)
- Throws:
PlanItException
- thrown if there is an error
-
get
public ConnectoidEdge get(long id)
Get connectoid edge by id- Parameters:
id
- the id of this connectoid edge- Returns:
- the retrieved connectoid edge
-
size
public int size()
Return number of connectoid edges on the network- Returns:
- the number of connectoid edges
-
iterator
public Iterator<ConnectoidEdge> iterator()
Collect the connectoid edges available through an iterator- Specified by:
iterator
in interfaceIterable<ConnectoidEdge>
-
-