Package org.goplanit.utils.mode
Interface Modes
-
- All Superinterfaces:
Iterable<Mode>
,LongMapWrapper<Mode>
,ManagedIdEntities<Mode>
,MapWrapper<Long,Mode>
- All Known Implementing Classes:
ModesImpl
public interface Modes extends ManagedIdEntities<Mode>
container class and factory methods for modes with some- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsPredefinedMode(PredefinedModeType modeType)
verify if predefined mode is registeredModes
deepClone()
Deep clone implementationModes
deepCloneWithMapping(BiConsumer<Mode,Mode> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapperPredefinedMode
get(PredefinedModeType modeType)
get predefined mode if it is registeredMode
getByXmlId(String xmlId)
Retrieve a Mode by its XML IdModeFactory
getFactory()
Collect the mode factory to use for creating instancesModes
shallowClone()
Shallow clone implementation-
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
-
-
-
-
Method Detail
-
get
PredefinedMode get(PredefinedModeType modeType)
get predefined mode if it is registered- Parameters:
modeType
- to collect- Returns:
- predefined mode when available, null otherwise
-
containsPredefinedMode
boolean containsPredefinedMode(PredefinedModeType modeType)
verify if predefined mode is registered- Parameters:
modeType
- to verify- Returns:
- true when available, false otherwise
-
getByXmlId
Mode getByXmlId(String xmlId)
Retrieve a Mode by its XML Id- Parameters:
xmlId
- the XML Id of the specified mode- Returns:
- the retrieved mode, or null if no mode was found
-
shallowClone
Modes shallowClone()
Shallow clone implementation- Specified by:
shallowClone
in interfaceManagedIdEntities<Mode>
- Specified by:
shallowClone
in interfaceMapWrapper<Long,Mode>
- Returns:
- clone of entities
-
deepClone
Modes deepClone()
Deep clone implementation- Specified by:
deepClone
in interfaceManagedIdEntities<Mode>
- Returns:
- deep copy of entities
-
deepCloneWithMapping
Modes deepCloneWithMapping(BiConsumer<Mode,Mode> mapper)
Deep clone implementation where the mapping for its internal copies is captured by the provided mapper- Specified by:
deepCloneWithMapping
in interfaceManagedIdEntities<Mode>
- Parameters:
mapper
- to apply to each mapping between original and copy- Returns:
- copy
-
getFactory
ModeFactory getFactory()
Collect the mode factory to use for creating instances- Specified by:
getFactory
in interfaceManagedIdEntities<Mode>
- Returns:
- modeFactory to create modes for this container
-
-