Package org.goplanit.graph.directed
Class DirectedVertexImpl<E extends EdgeSegment>
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.graph.GraphEntityImpl
-
- org.goplanit.graph.VertexImpl<Edge>
-
- org.goplanit.graph.directed.DirectedVertexImpl<E>
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,DirectedVertex
,GraphEntity
,Vertex
,ExternalIdAble
,IdAble
,ManagedId
- Direct Known Subclasses:
CentroidVertexImpl
,ConjugateConnectoidNodeImpl
,ConjugateDirectedVertexImpl
,ConjugateNodeImpl
,NodeImpl
,ServiceNodeImpl
public class DirectedVertexImpl<E extends EdgeSegment> extends VertexImpl<Edge> implements DirectedVertex
vertex representation connected to one or more entry and exit edges- Author:
- markr
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DirectedVertexImpl.EdgeSegmentIterable<ESI extends EdgeSegment>
Dedicated iterable to provide access to edge segments that are either incoming or outgoing for this vertexclass
DirectedVertexImpl.EdgeSegmentIterator<ES extends EdgeSegment>
Iterator for a run over the incoming or outgoing edge segments of this vertex (non-modifiable)
-
Field Summary
Fields Modifier and Type Field Description protected DirectedVertexImpl.EdgeSegmentIterable<E>
entryEdgeSegments
Entry edge segments iterable connected to this vertexprotected DirectedVertexImpl.EdgeSegmentIterable<E>
exitEdgeSegments
Exit edge segments which connect to this vertex-
Fields inherited from class org.goplanit.graph.VertexImpl
edges, inputProperties, position
-
Fields inherited from interface org.goplanit.utils.graph.directed.DirectedVertex
getEntryEdgeSegments, getExitEdgeSegments
-
Fields inherited from interface org.goplanit.utils.graph.Vertex
VERTEX_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DirectedVertexImpl(long id)
Constructor.protected
DirectedVertexImpl(DirectedVertexImpl<E> directedVertexImpl, boolean deepCopy)
Copy constructorprotected
DirectedVertexImpl(IdGroupingToken groupId)
Constructor.protected
DirectedVertexImpl(IdGroupingToken groupId, Class<? extends Vertex> idClazz)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectedVertexImpl<E>
deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call.Collection<? extends DirectedEdge>
getEdges()
Returns a collection of Edge objects (unmodifiable)Iterable<E>
getEntryEdgeSegments()
Collect the entry edge segments of this vertex (unmodifiable)Iterable<E>
getExitEdgeSegments()
Collect the exit edge segments of this vertex (unmodifiable)DirectedVertexImpl<E>
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.graph.VertexImpl
addEdge, addInputProperty, getInputProperty, getPosition, removeAllEdges, removeEdge, setPosition
-
Methods inherited from class org.goplanit.graph.GraphEntityImpl
generateAndSetId, generateId, recreateManagedIds, toString
-
Methods inherited from class org.goplanit.utils.id.ExternalIdAbleImpl
getExternalId, getXmlId, setExternalId, setXmlId
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.graph.directed.DirectedVertex
getEdgeSegment, getNumberOfEntryEdgeSegments, getNumberOfExitEdgeSegments, hasEntryEdgeSegments, hasEntrySegment, hasExitEdgeSegments, hasExitSegment
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds, resetChildManagedIdEntities
-
Methods inherited from interface org.goplanit.utils.graph.Vertex
addEdge, addEdges, addInputProperty, getEdges, getIdClass, getInputProperty, getNumberOfEdges, getPosition, hasPosition, isPositionEqual2D, isPositionEqual2D, removeAllEdges, removeEdge, removeEdge, removeEdges, replace, setPosition, transformPosition, validate
-
-
-
-
Field Detail
-
entryEdgeSegments
protected final DirectedVertexImpl.EdgeSegmentIterable<E extends EdgeSegment> entryEdgeSegments
Entry edge segments iterable connected to this vertex
-
exitEdgeSegments
protected final DirectedVertexImpl.EdgeSegmentIterable<E extends EdgeSegment> exitEdgeSegments
Exit edge segments which connect to this vertex
-
-
Constructor Detail
-
DirectedVertexImpl
protected DirectedVertexImpl(IdGroupingToken groupId, Class<? extends Vertex> idClazz)
Constructor- Parameters:
groupId
- , contiguous id generation within this group for instances of this classidClazz
- to use for generating the internal id
-
DirectedVertexImpl
protected DirectedVertexImpl(IdGroupingToken groupId)
Constructor. USe default id class for generating id- Parameters:
groupId
- , contiguous id generation within this group for instances of this class
-
DirectedVertexImpl
protected DirectedVertexImpl(long id)
Constructor. Only to be used when not relying on contiguous id generation within enclosing container- Parameters:
id
- to use
-
DirectedVertexImpl
protected DirectedVertexImpl(DirectedVertexImpl<E> directedVertexImpl, boolean deepCopy)
Copy constructor- Parameters:
directedVertexImpl
- to copydeepCopy
- flag indicating if a deep copy is required
-
-
Method Detail
-
getEntryEdgeSegments
public Iterable<E> getEntryEdgeSegments()
Collect the entry edge segments of this vertex (unmodifiable)- Specified by:
getEntryEdgeSegments
in interfaceDirectedVertex
- Returns:
- edgeSegments
-
getExitEdgeSegments
public Iterable<E> getExitEdgeSegments()
Collect the exit edge segments of this vertex (unmodifiable)- Specified by:
getExitEdgeSegments
in interfaceDirectedVertex
- Returns:
- edgeSegments
-
getEdges
public Collection<? extends DirectedEdge> getEdges()
Returns a collection of Edge objects (unmodifiable)- Specified by:
getEdges
in interfaceDirectedVertex
- Specified by:
getEdges
in interfaceVertex
- Overrides:
getEdges
in classVertexImpl<Edge>
- Returns:
- Set of Edge objects
-
shallowClone
public DirectedVertexImpl<E> shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceGraphEntity
- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceVertex
- Overrides:
shallowClone
in classVertexImpl<Edge>
- Returns:
- shallow copy of entity
-
deepClone
public DirectedVertexImpl<E> deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code- Specified by:
deepClone
in interfaceGraphEntity
- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in interfaceVertex
- Overrides:
deepClone
in classVertexImpl<Edge>
- Returns:
- deep copy of entity
-
-