Package org.planit.network.physical
Class NodesImpl<N extends Node>
- java.lang.Object
-
- org.planit.network.physical.NodesImpl<N>
-
- Type Parameters:
N- concrete class of nodes that are being created
public class NodesImpl<N extends Node> extends Object implements Nodes<N>
Nodes implementation wrapper that simply utilises passed in vertices of the desired generic type to delegate registration and creation of its nodes on- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NcreateNew()Create a new vertex (without registering on this class)Nget(long id)Find a entity by its dIterator<N>iterator()Nregister(N node)Add to the containerNregisterNew()Create and register new entityvoidremove(long nodeId)Remove by idvoidremove(N node)Removeintsize()Return number of registered entity-
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
-
remove
public void remove(N node)
Remove
-
remove
public void remove(long nodeId)
Remove by id
-
createNew
public N createNew()
Create a new vertex (without registering on this class)
-
registerNew
public N registerNew()
Create and register new entity- Specified by:
registerNewin interfaceVertices<N extends Node>- Returns:
- new node created
-
size
public int size()
Return number of registered entity
-
-