Class TakableRequirement<V>
- java.lang.Object
-
- me.hsgamer.bettergui.api.requirement.BaseRequirement<V>
-
- me.hsgamer.bettergui.api.requirement.TakableRequirement<V>
-
- Type Parameters:
V- the type of the final value
- All Implemented Interfaces:
MenuElement,Requirement
- Direct Known Subclasses:
LevelRequirement
public abstract class TakableRequirement<V> extends BaseRequirement<V>
The requirement that can take something
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface me.hsgamer.bettergui.api.requirement.Requirement
Requirement.Result
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTakableRequirement(RequirementBuilder.Input input)Create a new requirement
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleangetDefaultTake()Get the default "take" stateprotected abstract ObjectgetDefaultValue()Get the default valueprotected ObjecthandleValue(Object inputValue)Get the value from the input valueRequirement.ResultsuccessConditional(Consumer<UUID> applier)Get the success result with the conditional "take" stateRequirement.ResultsuccessConditional(ProcessApplier applier)Get the success result with the conditional "take" state-
Methods inherited from class me.hsgamer.bettergui.api.requirement.BaseRequirement
check, checkConverted, convert, getFinalValue, getMenu, getName
-
-
-
-
Constructor Detail
-
TakableRequirement
protected TakableRequirement(RequirementBuilder.Input input)
Create a new requirement- Parameters:
input- the input
-
-
Method Detail
-
handleValue
protected Object handleValue(Object inputValue)
Description copied from class:BaseRequirementGet the value from the input value- Overrides:
handleValuein classBaseRequirement<V>- Parameters:
inputValue- the input value- Returns:
- the value
-
getDefaultTake
protected abstract boolean getDefaultTake()
Get the default "take" state- Returns:
- the default "take" state
-
getDefaultValue
protected abstract Object getDefaultValue()
Get the default value- Returns:
- the default value
-
successConditional
public Requirement.Result successConditional(ProcessApplier applier)
Get the success result with the conditional "take" state- Parameters:
applier- the applier- Returns:
- the success result
-
successConditional
public Requirement.Result successConditional(Consumer<UUID> applier)
Get the success result with the conditional "take" state- Parameters:
applier- the applier- Returns:
- the success result
-
-