V - the type of the final valuepublic abstract class BaseRequirement<V> extends Object implements Requirement
Requirement.Result| Modifier | Constructor and Description |
|---|---|
protected |
BaseRequirement(RequirementBuilder.Input input)
Create a new requirement
|
| Modifier and Type | Method and Description |
|---|---|
Requirement.Result |
check(UUID uuid)
Check the requirement for the unique id
|
protected abstract Requirement.Result |
checkConverted(UUID uuid,
V value)
Check the requirement for the unique id with the converted value
|
protected abstract V |
convert(Object value,
UUID uuid)
Convert the raw value to the final value
|
V |
getFinalValue(UUID uuid)
Get the final value
|
Menu |
getMenu()
Get the menu containing the element
|
String |
getName()
Get the name of the requirement
|
protected Object |
handleValue(Object inputValue)
Get the value from the input value
|
protected BaseRequirement(RequirementBuilder.Input input)
input - the inputprotected Object handleValue(Object inputValue)
inputValue - the input valueprotected abstract V convert(Object value, UUID uuid)
value - the raw valueprotected abstract Requirement.Result checkConverted(UUID uuid, V value)
uuid - the unique idvalue - the converted valuepublic final V getFinalValue(UUID uuid)
uuid - the unique idpublic Requirement.Result check(UUID uuid)
Requirementcheck in interface Requirementuuid - the unique idpublic Menu getMenu()
MenuElementgetMenu in interface MenuElementpublic String getName()
RequirementgetName in interface RequirementCopyright © 2023. All rights reserved.