Package org.goplanit.graph
Class GraphEntitiesImpl<E extends GraphEntity>
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.graph.GraphEntitiesImpl<E>
-
- Type Parameters:
E
- type of graph entity
- All Implemented Interfaces:
Cloneable
,Iterable<E>
,GraphEntities<E>
,LongMapWrapper<E>
,MapWrapper<Long,E>
- Direct Known Subclasses:
DirectedEdgesImpl
,DirectedVerticesImpl
,EdgeSegmentsImpl
,EdgesImpl
,VerticesImpl
public abstract class GraphEntitiesImpl<E extends GraphEntity> extends LongMapWrapperImpl<E> implements GraphEntities<E>
Base class for containers of entities on graph- Author:
- markr
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GraphEntitiesImpl(Function<E,Long> valueToKey)
Constructorprotected
GraphEntitiesImpl(GraphEntitiesImpl<E> other)
copy constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract GraphEntitiesImpl<E>
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-
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, getFactory
-
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
-
GraphEntitiesImpl
protected GraphEntitiesImpl(Function<E,Long> valueToKey)
Constructor- Parameters:
valueToKey
- the mapping from key to value of the graph entity
-
GraphEntitiesImpl
protected GraphEntitiesImpl(GraphEntitiesImpl<E> other)
copy constructor- Parameters:
other
- to copy
-
-
Method Detail
-
clone
public abstract GraphEntitiesImpl<E> 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 interfaceGraphEntities<E extends GraphEntity>
- Specified by:
clone
in interfaceMapWrapper<Long,E extends GraphEntity>
- Specified by:
clone
in classLongMapWrapperImpl<E extends GraphEntity>
- Returns:
- copy
-
-