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>
public class LinkedListSetPromise<I,E> extends AbstractDelegateFunctionState
- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLinkedListSetPromise.Translate<E>Translates the entry to aFunctionState.
-
Field Summary
-
Fields inherited from class net.officefloor.frame.impl.execute.function.AbstractDelegateFunctionState
delegate
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E extends LinkedListSetEntry<E,O>,O>
FunctionStateall(LinkedListSet<E,O> linkedListSet, LinkedListSetPromise.Translate<E> translate)Executes aFunctionStatefor all entries of theLinkedListSet.FunctionStateexecute(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, toString
-
Methods inherited from class net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
-
-
-
Method Detail
-
purge
public static <E extends LinkedListSetEntry<E,O>,O> FunctionState purge(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>,O> FunctionState all(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
public FunctionState execute(FunctionStateContext context) throws java.lang.Throwable
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:
java.lang.Throwable- Possible failure ofFunctionStatelogic.
-
-