Class LinkedListSetPromise<I,E>
java.lang.Object
net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry<FunctionState,Flow>
net.officefloor.frame.impl.execute.function.AbstractDelegateFunctionState
net.officefloor.frame.impl.execute.function.LinkedListSetPromise<I,E>
- All Implemented Interfaces:
FunctionState,LinkedListSetEntry<FunctionState,Flow>
- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class net.officefloor.frame.impl.execute.function.AbstractDelegateFunctionState
delegate -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends LinkedListSetEntry<E,O>, O>
FunctionStateall(LinkedListSet<E, O> linkedListSet, LinkedListSetPromise.Translate<E> translate) Executes aFunctionStatefor all entries of theLinkedListSet.execute(FunctionStateContext context) Executes theFunctionState.static <E extends LinkedListSetEntry<E,O>, O>
FunctionStatepurge(LinkedListSet<E, O> linkedListSet, LinkedListSetPromise.Translate<E> translate) Purges theLinkedListSetand executes aFunctionStatefor each item.Methods inherited from class net.officefloor.frame.impl.execute.function.AbstractDelegateFunctionState
cancel, getLinkedListSetOwner, getResponsibleTeam, getThreadState, handleEscalation, isRequireThreadStateSafety, toStringMethods inherited from class net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry
getNext, getPrev, setNext, setPrevMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
Method Details
-
purge
public static <E extends LinkedListSetEntry<E,O>, FunctionState purgeO> (LinkedListSet<E, O> linkedListSet, LinkedListSetPromise.Translate<E> translate) Purges theLinkedListSetand executes aFunctionStatefor each item.- Type Parameters:
E-LinkedListSetEntrytype.O- Owner type ofLinkedListSetEntry.- Parameters:
linkedListSet-LinkedListSet.translate-LinkedListSetPromise.Translate.- Returns:
FunctionStateto purse theLinkedListSet.
-
all
public static <E extends LinkedListSetEntry<E,O>, FunctionState allO> (LinkedListSet<E, O> linkedListSet, LinkedListSetPromise.Translate<E> translate) Executes aFunctionStatefor all entries of theLinkedListSet. This does not change theLinkedListSet(as takes copy).- Type Parameters:
E-LinkedListSetEntrytype.O- Owner type ofLinkedListSetEntry.- Parameters:
linkedListSet-LinkedListSet.translate-LinkedListSetPromise.Translate.- Returns:
FunctionStateto purse theLinkedListSet.
-
execute
Description copied from interface:FunctionStateExecutes theFunctionState.- Specified by:
executein interfaceFunctionState- Overrides:
executein classAbstractDelegateFunctionState- Parameters:
context-FunctionStateContextfor executing theFunctionState.- Returns:
- Next
FunctionStateto be executed. May benullto indicate no furtherFunctionStateinstances to execute. - Throws:
Throwable- Possible failure ofFunctionStatelogic.
-