Package wtf.choco.arrows.api.property
Class DynamicArrowPropertyValue
java.lang.Object
wtf.choco.arrows.api.property.SimpleArrowProperty
wtf.choco.arrows.api.property.DynamicArrowPropertyValue
- All Implemented Interfaces:
ArrowPropertyValue
public class DynamicArrowPropertyValue extends SimpleArrowProperty
Represents an
ArrowPropertyValue
that gets recomputed every time it
is fetched. Useful for configuration-based values.- Author:
- Parker Hawke - Choco
-
Constructor Summary
Constructors Constructor Description DynamicArrowPropertyValue(Supplier<Object> valueSupplier)
Construct a new arrow property value with the value supplier. -
Method Summary
Methods inherited from class wtf.choco.arrows.api.property.SimpleArrowProperty
getAsBoolean, getAsByte, getAsDouble, getAsFloat, getAsInt, getAsLong, getAsShort, getAsString
-
Constructor Details
-
DynamicArrowPropertyValue
Construct a new arrow property value with the value supplier.- Parameters:
valueSupplier
- the value supplier
-
-
Method Details
-
getValue
Description copied from interface:ArrowPropertyValue
Get this value.- Specified by:
getValue
in interfaceArrowPropertyValue
- Overrides:
getValue
in classSimpleArrowProperty
- Returns:
- the value
-