Package org.goplanit.graph.directed
Class DirectedGraphImpl<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment>
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.graph.UntypedGraphImpl<V,E>
-
- org.goplanit.graph.directed.UntypedDirectedGraphImpl<V,E,ES>
-
- org.goplanit.graph.directed.DirectedGraphImpl<V,E,ES>
-
- All Implemented Interfaces:
Comparable<IdAble>
,DirectedGraph<V,E,ES>
,UntypedDirectedGraph<V,E,ES>
,UntypedGraph<V,E>
,IdAble
,ManagedId
public class DirectedGraphImpl<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment> extends UntypedDirectedGraphImpl<V,E,ES> implements DirectedGraph<V,E,ES>
A directed graph implementation consisting of directed vertices, directed edges and edge segments- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.graph.directed.UntypedDirectedGraphImpl
edgeSegments
-
Fields inherited from class org.goplanit.graph.UntypedGraphImpl
edges, vertices
-
Fields inherited from interface org.goplanit.utils.graph.UntypedGraph
GRAPH_ID_CLASS
-
-
Constructor Summary
Constructors Constructor Description DirectedGraphImpl(DirectedGraphImpl other, boolean deepCopy)
Copy constructorDirectedGraphImpl(DirectedGraphImpl directedGraphImpl, boolean deepCopy, GraphEntityDeepCopyMapper<V> vertexMapper, GraphEntityDeepCopyMapper<E> edgeMapper, GraphEntityDeepCopyMapper<ES> edgeSegmentMapper)
Copy constructorDirectedGraphImpl(IdGroupingToken groupToken, GraphEntities<V> vertices, GraphEntities<E> edges, GraphEntities<ES> edgeSegments)
DirectedGraph Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectedGraphImpl<V,E,ES>
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.DirectedGraphImpl<V,E,ES>
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.graph.directed.UntypedDirectedGraphImpl
getEdgeSegments, smartDeepClone
-
Methods inherited from class org.goplanit.graph.UntypedGraphImpl
generatedGraphId, getEdges, getGraphIdGroupingToken, getIdClass, getVertices, recreateManagedIds, smartDeepClone
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
getIdClass, recreateManagedIds, resetChildManagedIdEntities
-
Methods inherited from interface org.goplanit.utils.graph.UntypedDirectedGraph
getEdgeSegments, isEmpty, validate
-
Methods inherited from interface org.goplanit.utils.graph.UntypedGraph
getEdges, getVertices, transformGeometries
-
-
-
-
Constructor Detail
-
DirectedGraphImpl
public DirectedGraphImpl(IdGroupingToken groupToken, GraphEntities<V> vertices, GraphEntities<E> edges, GraphEntities<ES> edgeSegments)
DirectedGraph Constructor- Parameters:
groupToken
- contiguous id generation within this group for instances of this classvertices
- to useedges
- to useedgeSegments
- to use
-
DirectedGraphImpl
public DirectedGraphImpl(DirectedGraphImpl other, boolean deepCopy)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwise
-
DirectedGraphImpl
public DirectedGraphImpl(DirectedGraphImpl directedGraphImpl, boolean deepCopy, GraphEntityDeepCopyMapper<V> vertexMapper, GraphEntityDeepCopyMapper<E> edgeMapper, GraphEntityDeepCopyMapper<ES> edgeSegmentMapper)
Copy constructor- Parameters:
directedGraphImpl
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwisevertexMapper
- tracking how orignal vertices are mapped to new vertices in case of deep copyedgeMapper
- tracking how orignal edges are mapped to new edges in case of deep copyedgeSegmentMapper
- tracking how orignal edge segments are mapped to new edge segments in case of deep copy
-
-
Method Detail
-
shallowClone
public DirectedGraphImpl<V,E,ES> shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceUntypedDirectedGraph<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment>
- Specified by:
shallowClone
in interfaceUntypedGraph<V extends DirectedVertex,E extends DirectedEdge>
- Overrides:
shallowClone
in classUntypedDirectedGraphImpl<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment>
- Returns:
- shallow copy of entity
-
deepClone
public DirectedGraphImpl<V,E,ES> 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 For directed graphs we also update the internal interdependencies based on available knowledge- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in interfaceUntypedDirectedGraph<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment>
- Specified by:
deepClone
in interfaceUntypedGraph<V extends DirectedVertex,E extends DirectedEdge>
- Overrides:
deepClone
in classUntypedDirectedGraphImpl<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment>
- Returns:
- deep copy of entity
-
-