Package org.goplanit.service.routed
Class RoutedServicesLayersImpl
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.utils.id.ManagedIdEntitiesImpl<RoutedServicesLayer>
-
- org.goplanit.service.routed.RoutedServicesLayersImpl
-
- All Implemented Interfaces:
Iterable<RoutedServicesLayer>
,ManagedIdEntities<RoutedServicesLayer>
,RoutedServicesLayers
,LongMapWrapper<RoutedServicesLayer>
,MapWrapper<Long,RoutedServicesLayer>
public class RoutedServicesLayersImpl extends ManagedIdEntitiesImpl<RoutedServicesLayer> implements RoutedServicesLayers
Implementation of the RoutedServicesLayers interface.- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected RoutedServicesLayerFactoryImpl
factory
factory for this container class-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Constructor Summary
Constructors Modifier Constructor Description RoutedServicesLayersImpl(RoutedServicesLayersImpl other, boolean deepCopy, BiConsumer<RoutedServicesLayer,RoutedServicesLayer> mapper)
Copy constructor, also creates new factory with this as its underlying containerprotected
RoutedServicesLayersImpl(IdGroupingToken tokenId)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutedServicesLayersImpl
deepClone()
Deep clone implementationRoutedServicesLayersImpl
deepCloneWithMapping(BiConsumer<RoutedServicesLayer,RoutedServicesLayer> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapperRoutedServicesLayerFactoryImpl
getFactory()
Factory to create instance of managed id entity (for this container class)RoutedServicesLayersImpl
shallowClone()
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.id.ManagedIdEntitiesImpl
getManagedIdClass, recreateIds, reset, updateIdMapping
-
Methods inherited from class org.goplanit.utils.wrapper.LongMapWrapperImpl
containsKey, get, remove
-
Methods inherited from class org.goplanit.utils.wrapper.MapWrapperImpl
clear, containsValue, createEmptyInstance, firstMatch, get, getKeyByValue, getMap, getValueToKey, isEmpty, iterator, register, remove, removeIf, setMap, size, toCollection, valuesAsNewSet
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.wrapper.LongMapWrapper
get, remove
-
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntities
containsKey, getManagedIdClass, groupBy, recreateIds, recreateIds, reset, streamSortedBy
-
Methods inherited from interface org.goplanit.utils.wrapper.MapWrapper
addAll, clear, containsValue, firstMatch, forEachIn, get, getFirst, getKeyByValue, isEmpty, register, remove, removeAll, removeIf, size, stream, streamSorted, toCollection, toMap, valuesAsNewSet
-
Methods inherited from interface org.goplanit.utils.service.routed.RoutedServicesLayers
indexLayersByMode, isEachLayerEmpty
-
-
-
-
Field Detail
-
factory
protected final RoutedServicesLayerFactoryImpl factory
factory for this container class
-
-
Constructor Detail
-
RoutedServicesLayersImpl
protected RoutedServicesLayersImpl(IdGroupingToken tokenId)
Constructor- Parameters:
tokenId
- to use
-
RoutedServicesLayersImpl
public RoutedServicesLayersImpl(RoutedServicesLayersImpl other, boolean deepCopy, BiConsumer<RoutedServicesLayer,RoutedServicesLayer> mapper)
Copy constructor, also creates new factory with this as its underlying container- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwisemapper
- to use for tracking mapping between original and copied entity (may be null)
-
-
Method Detail
-
getFactory
public RoutedServicesLayerFactoryImpl getFactory()
Factory to create instance of managed id entity (for this container class)- Specified by:
getFactory
in interfaceManagedIdEntities<RoutedServicesLayer>
- Specified by:
getFactory
in interfaceRoutedServicesLayers
- Returns:
- entity factory
-
shallowClone
public RoutedServicesLayersImpl shallowClone()
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:
shallowClone
in interfaceManagedIdEntities<RoutedServicesLayer>
- Specified by:
shallowClone
in interfaceMapWrapper<Long,RoutedServicesLayer>
- Specified by:
shallowClone
in interfaceRoutedServicesLayers
- Specified by:
shallowClone
in classManagedIdEntitiesImpl<RoutedServicesLayer>
- Returns:
- copy
-
deepClone
public RoutedServicesLayersImpl deepClone()
Deep clone implementation- Specified by:
deepClone
in interfaceManagedIdEntities<RoutedServicesLayer>
- Specified by:
deepClone
in interfaceRoutedServicesLayers
- Specified by:
deepClone
in classManagedIdEntitiesImpl<RoutedServicesLayer>
- Returns:
- deep copy of entities
-
deepCloneWithMapping
public RoutedServicesLayersImpl deepCloneWithMapping(BiConsumer<RoutedServicesLayer,RoutedServicesLayer> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMapping
in interfaceManagedIdEntities<RoutedServicesLayer>
- Specified by:
deepCloneWithMapping
in interfaceRoutedServicesLayers
- Specified by:
deepCloneWithMapping
in classManagedIdEntitiesImpl<RoutedServicesLayer>
- Parameters:
mapper
- to apply to each mapping between original and copy- Returns:
- copy
-
-