Package org.goplanit.network.virtual
Class CentroidVertexImpl
- 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<ConnectoidSegment>
-
- org.goplanit.network.virtual.CentroidVertexImpl
-
- All Implemented Interfaces:
Serializable,Comparable<IdAble>,DirectedVertex,GraphEntity,Vertex,ExternalIdAble,IdAble,ManagedId,CentroidVertex
public class CentroidVertexImpl extends DirectedVertexImpl<ConnectoidSegment> implements CentroidVertex
The vertex with a direct relation to a centroid (for a given layer)- 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 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
LOGGER, VERTEX_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCentroidVertexImpl(DirectedVertexImpl<ConnectoidSegment> other, boolean deepCopy)Copy constructorprotectedCentroidVertexImpl(IdGroupingToken groupId, Centroid parentCentroid)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CentroidgetParent()org.locationtech.jts.geom.PointgetPosition()position of centroid vertex.voidsetParent(Centroid parent)voidsetPosition(org.locationtech.jts.geom.Point position)Position cannot be altered on centroid vertex when centroid that it is related to has already a position defined.-
Methods inherited from class org.goplanit.graph.directed.DirectedVertexImpl
deepClone, getEdges, getEntryEdgeSegments, getExitEdgeSegments, shallowClone
-
Methods inherited from class org.goplanit.graph.VertexImpl
addEdge, addInputProperty, getInputProperty, removeAllEdges, removeEdge
-
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
getEdges, getEdgeSegment, getEntryEdgeSegments, getExitEdgeSegments, 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, deepClone, getEdges, getIdClass, getInputProperty, getNumberOfEdges, hasPosition, isPositionEqual2D, isPositionEqual2D, removeAllEdges, removeEdge, removeEdge, removeEdges, replace, shallowClone, transformPosition, validate
-
-
-
-
Constructor Detail
-
CentroidVertexImpl
protected CentroidVertexImpl(IdGroupingToken groupId, Centroid parentCentroid)
Constructor- Parameters:
groupId- for id generationparentCentroid- parent centroid this vertex represents on its layer
-
CentroidVertexImpl
protected CentroidVertexImpl(DirectedVertexImpl<ConnectoidSegment> other, boolean deepCopy)
Copy constructor- Parameters:
other- to copydeepCopy- when true perform deep copy, when false do not
-
-
Method Detail
-
getParent
public Centroid getParent()
- Specified by:
getParentin interfaceCentroidVertex
-
setParent
public void setParent(Centroid parent)
- Specified by:
setParentin interfaceCentroidVertex
-
getPosition
public org.locationtech.jts.geom.Point getPosition()
position of centroid vertex. When not explicitly set it is collected from its parent. If parent centroid and its own position differ, a warning is issued- Specified by:
getPositionin interfaceVertex- Overrides:
getPositionin classVertexImpl<Edge>- Returns:
- centroid position
-
setPosition
public void setPosition(org.locationtech.jts.geom.Point position)
Position cannot be altered on centroid vertex when centroid that it is related to has already a position defined. Only when centroid's position has no meaning, i.e., it is not set, one can assign a unique position to each centroid vertex related to this centroid.- Specified by:
setPositionin interfaceVertex- Overrides:
setPositionin classVertexImpl<Edge>- Parameters:
position- to set
-
-