Class UpdaterCollector<O>
java.lang.Object
ch.nolix.base.programcontrol.process.UpdaterCollector<O>
- Type Parameters:
O- is the type of theObjects the updaters of aUpdaterCollectorcan mutate.
- All Implemented Interfaces:
IUpdaterCollector<O>, Clearable, EmptinessRequestable
- Author:
- Silvan Wyss
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUpdater(Consumer<O> updater) Adds the given updater to the currentIUpdaterCollector.voidaddUpdaters(IContainer<Consumer<O>> updaters) Adds the given updaters to the currentIUpdaterCollector.voidclear()Removes the elements of the currentClearable.booleanisEmpty()voidupdateObjectAndClear(O object) Updates the given object and clears the currentIUpdaterCollector.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EmptinessRequestable
containsAny
-
Constructor Details
-
UpdaterCollector
public UpdaterCollector()
-
-
Method Details
-
addUpdater
Adds the given updater to the currentIUpdaterCollector.- Specified by:
addUpdaterin interfaceIUpdaterCollector<O>- Parameters:
updater-
-
addUpdaters
Adds the given updaters to the currentIUpdaterCollector.- Specified by:
addUpdatersin interfaceIUpdaterCollector<O>- Parameters:
updaters-
-
clear
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceEmptinessRequestable- Returns:
- true if
EmptinessRequestabledoes not contain an element, false otherwise.
-
updateObjectAndClear
Updates the given object and clears the currentIUpdaterCollector.- Specified by:
updateObjectAndClearin interfaceIUpdaterCollector<O>- Parameters:
object-
-