Package org.goplanit.graph.directed
Class ConjugateEdgeSegmentImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.graph.GraphEntityImpl
-
- org.goplanit.graph.directed.EdgeSegmentImpl<ConjugateDirectedEdge>
-
- org.goplanit.graph.directed.ConjugateEdgeSegmentImpl
-
- All Implemented Interfaces:
Serializable,Comparable<IdAble>,ConjugateEdgeSegment,EdgeSegment,GraphEntity,ExternalIdAble,IdAble,ManagedId
public class ConjugateEdgeSegmentImpl extends EdgeSegmentImpl<ConjugateDirectedEdge> implements ConjugateEdgeSegment
Conjugate EdgeSegment represents an edge in a particular (single) direction in a conjugate directed graph.- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.goplanit.utils.graph.directed.ConjugateEdgeSegment
CONJUGATE_EDGE_SEGMENT_ID_CLASS
-
Fields inherited from interface org.goplanit.utils.graph.directed.EdgeSegment
EDGE_SEGMENT_ID_CLASS, getDownstreamVertex, getUpstreamVertex
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedConjugateEdgeSegmentImpl(ConjugateEdgeSegmentImpl other, boolean deepCopy)Copy constructorprotectedConjugateEdgeSegmentImpl(IdGroupingToken groupId, boolean directionAB)Constructor (without setting parent edge)protectedConjugateEdgeSegmentImpl(IdGroupingToken groupId, ConjugateDirectedEdge parentEdge, boolean directionAb)ConstructorprotectedConjugateEdgeSegmentImpl(IdGroupingToken groupId, ConjugateDirectedEdge parentEdge, boolean directionAb, Class<ConjugateEdgeSegment> idClazz)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConjugateEdgeSegmentImpldeepClone()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.ConjugateEdgeSegmentImplshallowClone()Create a shallow copy of this entitybooleanvalidate()validate the contents of this edge segment-
Methods inherited from class org.goplanit.graph.directed.EdgeSegmentImpl
getParent, isDirectionAb, removeParentEdge, setParent, validate
-
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.ConjugateEdgeSegment
getDownstreamVertex, getIdClass, getOppositeDirectionSegment, getOriginalAdjcentEdgeSegments, getParent, getUpstreamVertex
-
Methods inherited from interface org.goplanit.utils.graph.directed.EdgeSegment
getLengthKm, getParentName, hasGeometry, hasParent, hasParentName, isAdjacent, isDirectionAb, isParentGeometryInSegmentDirection, removeParentEdge, setParent
-
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
-
-
-
-
Constructor Detail
-
ConjugateEdgeSegmentImpl
protected ConjugateEdgeSegmentImpl(IdGroupingToken groupId, ConjugateDirectedEdge parentEdge, boolean directionAb, Class<ConjugateEdgeSegment> idClazz)
Constructor- Parameters:
groupId- contiguous id generation within this group for instances of this classparentEdge- parent edge of segmentdirectionAb- direction of travelidClazz- to use
-
ConjugateEdgeSegmentImpl
protected ConjugateEdgeSegmentImpl(IdGroupingToken groupId, ConjugateDirectedEdge parentEdge, boolean directionAb)
Constructor- Parameters:
groupId- contiguous id generation within this group for instances of this classparentEdge- parent edge of segmentdirectionAb- direction of travel
-
ConjugateEdgeSegmentImpl
protected ConjugateEdgeSegmentImpl(IdGroupingToken groupId, boolean directionAB)
Constructor (without setting parent edge)- Parameters:
groupId- contiguous id generation within this group for instances of this classdirectionAB- direction of travel
-
ConjugateEdgeSegmentImpl
protected ConjugateEdgeSegmentImpl(ConjugateEdgeSegmentImpl other, boolean deepCopy)
Copy constructor- Parameters:
other- to copydeepCopy- when true, create a deep copy, shallow copy otherwise
-
-
Method Detail
-
shallowClone
public ConjugateEdgeSegmentImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceConjugateEdgeSegment- Specified by:
shallowClonein interfaceEdgeSegment- Specified by:
shallowClonein interfaceGraphEntity- Specified by:
shallowClonein interfaceIdAble- Overrides:
shallowClonein classEdgeSegmentImpl<ConjugateDirectedEdge>- Returns:
- shallow copy of entity
-
deepClone
public ConjugateEdgeSegmentImpl 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:
deepClonein interfaceConjugateEdgeSegment- Specified by:
deepClonein interfaceEdgeSegment- Specified by:
deepClonein interfaceGraphEntity- Specified by:
deepClonein interfaceIdAble- Overrides:
deepClonein classEdgeSegmentImpl<ConjugateDirectedEdge>- Returns:
- deep copy of entity
-
validate
public boolean validate()
validate the contents of this edge segment- Specified by:
validatein interfaceEdgeSegment- Overrides:
validatein classEdgeSegmentImpl<ConjugateDirectedEdge>- Returns:
- true when valid, false otherwise
-
-