Package org.goplanit.graph
Class GraphEntityFactoryImpl<E extends GraphEntity>
- java.lang.Object
-
- org.goplanit.utils.id.ManagedIdEntityFactoryImpl<E>
-
- org.goplanit.graph.GraphEntityFactoryImpl<E>
-
- Type Parameters:
E- type of graph entity
- All Implemented Interfaces:
GraphEntityFactory<E>,ManagedIdEntityFactory<E>
- Direct Known Subclasses:
CentroidVertexFactoryImpl,ConjugateConnectoidEdgeFactoryImpl,ConjugateConnectoidNodeFactoryImpl,ConjugateConnectoidSegmentFactoryImpl,ConjugateDirectedEdgeFactoryImpl,ConjugateDirectedVertexFactoryImpl,ConjugateEdgeSegmentFactoryImpl,ConjugateLinkFactoryImpl,ConjugateLinkSegmentFactoryImpl,ConjugateNodeFactoryImpl,ConjugateVertexFactoryImpl,ConnectoidEdgeFactoryImpl,ConnectoidSegmentFactoryImpl,DirectedEdgeFactoryImpl,DirectedVertexFactoryImpl,EdgeFactoryImpl,EdgeSegmentFactoryImpl,LinkFactoryImpl,MacroscopicLinkFactoryImpl,MacroscopicLinkSegmentFactoryImpl,NodeFactoryImpl,ServiceLegFactoryImpl,ServiceLegSegmentFactoryImpl,ServiceNodeFactoryImpl,VertexFactoryImpl
public abstract class GraphEntityFactoryImpl<E extends GraphEntity> extends ManagedIdEntityFactoryImpl<E> implements GraphEntityFactory<E>
Base implementation for creating and registering graph entities on underlying container and conducting changes to ids based on the factory settings for egenrating ids.- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
groupIdToken
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGraphEntityFactoryImpl(GraphEntities<E> graphEntities)Constructor.protectedGraphEntityFactoryImpl(IdGroupingToken groupIdToken)Constructor without a container.protectedGraphEntityFactoryImpl(IdGroupingToken groupIdToken, GraphEntities<E> graphEntities)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GraphEntities<E>getGraphEntities()The entities to register onprotected voidsetGraphEntities(GraphEntities<E> graphEntities)Use with caution as it replaces the managed id container in its entirety-
Methods inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
createUniqueDeepCopyOf, createUniqueShallowCopyOf, getIdGroupingToken, setIdGroupingToken
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntityFactory
createUniqueDeepCopyOf, createUniqueShallowCopyOf, getIdGroupingToken, setIdGroupingToken
-
-
-
-
Constructor Detail
-
GraphEntityFactoryImpl
protected GraphEntityFactoryImpl(IdGroupingToken groupIdToken)
Constructor without a container. Only use when the graph entities are know to be set manually afterward by derived class- Parameters:
groupIdToken- to use for creating element ids
-
GraphEntityFactoryImpl
protected GraphEntityFactoryImpl(IdGroupingToken groupIdToken, GraphEntities<E> graphEntities)
Constructor- Parameters:
groupIdToken- to use for creating element idsgraphEntities- to register the created instances on
-
GraphEntityFactoryImpl
protected GraphEntityFactoryImpl(GraphEntities<E> graphEntities)
Constructor. Do not use unless the entities do not rely on id generation but obtain their unique id from elsewhere- Parameters:
graphEntities- to register the created instances on
-
-
Method Detail
-
setGraphEntities
protected void setGraphEntities(GraphEntities<E> graphEntities)
Use with caution as it replaces the managed id container in its entirety- Parameters:
graphEntities- to use as the managed id container
-
getGraphEntities
protected GraphEntities<E> getGraphEntities()
The entities to register on- Returns:
- graphEntities
-
-