Package me.hsgamer.bettergui.action
Class ActionApplier
- java.lang.Object
-
- me.hsgamer.bettergui.action.ActionApplier
-
- All Implemented Interfaces:
BiConsumer<UUID,TaskProcess>,ProcessApplier
public class ActionApplier extends Object implements ProcessApplier
The action applier
-
-
Field Summary
Fields Modifier and Type Field Description static ActionApplierEMPTYThe empty action applier
-
Constructor Summary
Constructors Constructor Description ActionApplier(List<Action> actions, StringReplacer replacer)Create a new action applierActionApplier(Menu menu, Object value)Create a new action applier
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(UUID uuid, TaskProcess process)voidacceptWithoutNext(UUID uuid, TaskProcess process)Apply the action to the process without the next actionbooleanisEmpty()Check if the applier is empty-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiConsumer
andThen
-
-
-
-
Field Detail
-
EMPTY
public static final ActionApplier EMPTY
The empty action applier
-
-
Constructor Detail
-
ActionApplier
public ActionApplier(List<Action> actions, StringReplacer replacer)
Create a new action applier- Parameters:
actions- the actionsreplacer- the replacer
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Check if the applier is empty- Returns:
- true if it is empty
-
acceptWithoutNext
public void acceptWithoutNext(UUID uuid, TaskProcess process)
Apply the action to the process without the next action- Parameters:
uuid- the unique idprocess- the process
-
accept
public void accept(UUID uuid, TaskProcess process)
- Specified by:
acceptin interfaceBiConsumer<UUID,TaskProcess>
-
-