Package org.goplanit.zoning
Class ZonesImpl<Z extends Zone>
- java.lang.Object
-
- org.goplanit.utils.wrapper.MapWrapperImpl<Long,V>
-
- org.goplanit.utils.wrapper.LongMapWrapperImpl<E>
-
- org.goplanit.utils.id.ManagedIdEntitiesImpl<Z>
-
- org.goplanit.zoning.ZonesImpl<Z>
-
- Type Parameters:
Z
- zone type
- All Implemented Interfaces:
Iterable<Z>
,ManagedIdEntities<Z>
,LongMapWrapper<Z>
,MapWrapper<Long,Z>
,Zones<Z>
- Direct Known Subclasses:
OdZonesImpl
,TransferZonesImpl
public abstract class ZonesImpl<Z extends Zone> extends ManagedIdEntitiesImpl<Z> implements Zones<Z>
Partial implementation of the Zones <T> interface- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntitiesImpl
managedIdClass
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract ZonesImpl<Z>
deepClone()
Deep clone implementationabstract ZonesImpl<Z>
deepCloneWithMapping(BiConsumer<Z,Z> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapperabstract ZonesImpl<Z>
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, getFactory, 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.zoning.Zones
getByXmlId, getNumberOfCentroids
-
-
-
-
Constructor Detail
-
ZonesImpl
public ZonesImpl()
Constructor
-
ZonesImpl
public ZonesImpl(ZonesImpl<Z> zonesImpl, boolean deepCopy, BiConsumer<Z,Z> mapper)
Copy constructor- Parameters:
zonesImpl
- 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
-
shallowClone
public abstract ZonesImpl<Z> 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<Z extends Zone>
- Specified by:
shallowClone
in interfaceMapWrapper<Long,Z extends Zone>
- Specified by:
shallowClone
in interfaceZones<Z extends Zone>
- Specified by:
shallowClone
in classManagedIdEntitiesImpl<Z extends Zone>
- Returns:
- copy
-
deepCloneWithMapping
public abstract ZonesImpl<Z> deepCloneWithMapping(BiConsumer<Z,Z> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMapping
in interfaceManagedIdEntities<Z extends Zone>
- Specified by:
deepCloneWithMapping
in interfaceZones<Z extends Zone>
- Specified by:
deepCloneWithMapping
in classManagedIdEntitiesImpl<Z extends Zone>
- Parameters:
mapper
- to apply to each mapping between original and copy- Returns:
- copy
-
-