Package org.goplanit.graph.directed
Class ConjugateDirectedVertexImpl
- 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<ConjugateEdgeSegment>
-
- org.goplanit.graph.directed.ConjugateDirectedVertexImpl
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,ConjugateDirectedVertex
,DirectedVertex
,GraphEntity
,Vertex
,ExternalIdAble
,IdAble
,ManagedId
public class ConjugateDirectedVertexImpl extends DirectedVertexImpl<ConjugateEdgeSegment> implements ConjugateDirectedVertex
Conjugate directed vertex representation connected to one or more entry and exit conjugate edges- Author:
- markr
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.goplanit.graph.directed.DirectedVertexImpl
DirectedVertexImpl.EdgeSegmentIterable<ESI extends EdgeSegment>, DirectedVertexImpl.EdgeSegmentIterator<ES extends EdgeSegment>
-
-
Field Summary
Fields Modifier and Type Field Description protected DirectedEdge
originalEdge
original edge this conjugate vertex represents-
Fields inherited from class org.goplanit.graph.directed.DirectedVertexImpl
entryEdgeSegments, exitEdgeSegments
-
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
ConjugateDirectedVertexImpl(ConjugateDirectedVertexImpl other, boolean deepCopy)
Copy constructorprotected
ConjugateDirectedVertexImpl(IdGroupingToken groupId, DirectedEdge originalEdge)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConjugateDirectedVertexImpl
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 ConjugateDirectedEdge>
getEdges()
Returns a collection of Edge objects (unmodifiable)Iterable<ConjugateEdgeSegment>
getEntryEdgeSegments()
Collect the entry edge segments of this vertex (unmodifiable)Iterable<ConjugateEdgeSegment>
getExitEdgeSegments()
Collect the exit edge segments of this vertex (unmodifiable)DirectedEdge
getOriginalEdge()
Original edge in original directed graph this conjugate representsConjugateDirectedVertexImpl
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.ConjugateDirectedVertex
getEdgeSegment
-
Methods inherited from interface org.goplanit.utils.graph.directed.DirectedVertex
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
-
originalEdge
protected final DirectedEdge originalEdge
original edge this conjugate vertex represents
-
-
Constructor Detail
-
ConjugateDirectedVertexImpl
protected ConjugateDirectedVertexImpl(IdGroupingToken groupId, DirectedEdge originalEdge)
Constructor- Parameters:
groupId
- , contiguous id generation within this group for instances of this classoriginalEdge
- this conjugate represents in the conjugate graph
-
ConjugateDirectedVertexImpl
protected ConjugateDirectedVertexImpl(ConjugateDirectedVertexImpl other, boolean deepCopy)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwise
-
-
Method Detail
-
getEntryEdgeSegments
public Iterable<ConjugateEdgeSegment> getEntryEdgeSegments()
Collect the entry edge segments of this vertex (unmodifiable)- Specified by:
getEntryEdgeSegments
in interfaceConjugateDirectedVertex
- Specified by:
getEntryEdgeSegments
in interfaceDirectedVertex
- Overrides:
getEntryEdgeSegments
in classDirectedVertexImpl<ConjugateEdgeSegment>
- Returns:
- edgeSegments
-
getExitEdgeSegments
public Iterable<ConjugateEdgeSegment> getExitEdgeSegments()
Collect the exit edge segments of this vertex (unmodifiable)- Specified by:
getExitEdgeSegments
in interfaceConjugateDirectedVertex
- Specified by:
getExitEdgeSegments
in interfaceDirectedVertex
- Overrides:
getExitEdgeSegments
in classDirectedVertexImpl<ConjugateEdgeSegment>
- Returns:
- edgeSegments
-
getEdges
public Collection<? extends ConjugateDirectedEdge> getEdges()
Returns a collection of Edge objects (unmodifiable)- Specified by:
getEdges
in interfaceConjugateDirectedVertex
- Specified by:
getEdges
in interfaceDirectedVertex
- Specified by:
getEdges
in interfaceVertex
- Overrides:
getEdges
in classDirectedVertexImpl<ConjugateEdgeSegment>
- Returns:
- Set of Edge objects
-
shallowClone
public ConjugateDirectedVertexImpl 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 classDirectedVertexImpl<ConjugateEdgeSegment>
- Returns:
- shallow copy of entity
-
deepClone
public ConjugateDirectedVertexImpl 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 classDirectedVertexImpl<ConjugateEdgeSegment>
- Returns:
- deep copy of entity
-
getOriginalEdge
public DirectedEdge getOriginalEdge()
Original edge in original directed graph this conjugate represents- Specified by:
getOriginalEdge
in interfaceConjugateDirectedVertex
- Returns:
- original edge
-
-