Package org.goplanit.graph.directed
Class EdgeSegmentsImpl
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.graph.GraphEntitiesImpl<EdgeSegment>
-
- org.goplanit.graph.directed.EdgeSegmentsImpl
-
- All Implemented Interfaces:
Cloneable
,Iterable<EdgeSegment>
,EdgeSegments
,GraphEntities<EdgeSegment>
,LongMapWrapper<EdgeSegment>
,MapWrapper<Long,EdgeSegment>
public class EdgeSegmentsImpl extends GraphEntitiesImpl<EdgeSegment> implements EdgeSegments
Implementation of EdgeSegments interface.- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description EdgeSegmentsImpl(EdgeSegmentsImpl edgeSegmentsImpl)
Copy constructorEdgeSegmentsImpl(IdGroupingToken groupId)
ConstructorEdgeSegmentsImpl(IdGroupingToken groupId, EdgeSegmentFactory edgeSegmentFactory)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EdgeSegmentsImpl
clone()
Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly createdEdgeSegmentFactory
getFactory()
Collect the edge segment factory to use for creating instancesvoid
register(DirectedEdge parentEdge, EdgeSegment edgeSegment, boolean directionAB)
Register a edge segment (not registered on nodes and edge)-
Methods inherited from class org.goplanit.utils.wrapper.LongMapWrapperImpl
containsKey, get, remove
-
Methods inherited from class org.goplanit.utils.wrapper.MapWrapperImpl
clear, contains, createEmptyInstance, findFirst, get, getKeyByValue, getMap, getValueToKey, isEmpty, iterator, register, remove, setMap, size, toCollection, valuesAsNewSet
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.graph.GraphEntities
forEachMatchingIdIn, getByExternalId, getByXmlId
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.wrapper.LongMapWrapper
containsKey, get, remove
-
Methods inherited from interface org.goplanit.utils.wrapper.MapWrapper
addAll, clear, contains, findFirst, forEachIn, get, getFirst, getKeyByValue, isEmpty, register, remove, size, toCollection, valuesAsNewSet
-
-
-
-
Constructor Detail
-
EdgeSegmentsImpl
public EdgeSegmentsImpl(IdGroupingToken groupId)
Constructor- Parameters:
groupId
- to use for creating ids for instances
-
EdgeSegmentsImpl
public EdgeSegmentsImpl(IdGroupingToken groupId, EdgeSegmentFactory edgeSegmentFactory)
Constructor- Parameters:
groupId
- to use for creating ids for instancesedgeSegmentFactory
- to use
-
EdgeSegmentsImpl
public EdgeSegmentsImpl(EdgeSegmentsImpl edgeSegmentsImpl)
Copy constructor- Parameters:
edgeSegmentsImpl
- top copy
-
-
Method Detail
-
register
public void register(DirectedEdge parentEdge, EdgeSegment edgeSegment, boolean directionAB) throws PlanItException
Register a edge segment (not registered on nodes and edge)- Specified by:
register
in interfaceEdgeSegments
- Parameters:
parentEdge
- the parent edge which specified edge segment will be registered onedgeSegment
- edge segment to be registereddirectionAB
- direction of travel- Throws:
PlanItException
- thrown if there is an error
-
getFactory
public EdgeSegmentFactory getFactory()
Collect the edge segment factory to use for creating instances- Specified by:
getFactory
in interfaceEdgeSegments
- Specified by:
getFactory
in interfaceGraphEntities<EdgeSegment>
- Returns:
- edgeSegmentFactory to create edge segments for this container
-
clone
public EdgeSegmentsImpl clone()
Each map wrapper should be cloneable where the contents are references of the original where possible but the underlying map itself is newly created- Specified by:
clone
in interfaceEdgeSegments
- Specified by:
clone
in interfaceGraphEntities<EdgeSegment>
- Specified by:
clone
in interfaceMapWrapper<Long,EdgeSegment>
- Specified by:
clone
in classGraphEntitiesImpl<EdgeSegment>
- Returns:
- copy
-
-