Class ConditionalProperty<T>
java.lang.Object
dev.prozilla.pine.common.property.VariableProperty<T>
dev.prozilla.pine.common.property.ConditionalProperty<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final VariableProperty
<Boolean> protected final VariableProperty
<T> protected final VariableProperty
<T> Fields inherited from class dev.prozilla.pine.common.property.VariableProperty
random
-
Constructor Summary
ConstructorsConstructorDescriptionConditionalProperty
(VariableProperty<Boolean> condition, VariableProperty<T> propertyTrue, VariableProperty<T> propertyFalse) ConditionalProperty
(VariableProperty<Boolean> condition, T valueTrue, T valueFalse) -
Method Summary
Methods inherited from class dev.prozilla.pine.common.property.VariableProperty
exists, hasValue
-
Field Details
-
condition
-
propertyTrue
-
propertyFalse
-
-
Constructor Details
-
ConditionalProperty
-
ConditionalProperty
public ConditionalProperty(VariableProperty<Boolean> condition, VariableProperty<T> propertyTrue, VariableProperty<T> propertyFalse)
-
-
Method Details
-
getValue
Description copied from class:VariableProperty
Returns the value of this property.- Specified by:
getValue
in classVariableProperty<T>
- Returns:
- The value of this property.
-
isFalse
public boolean isFalse()Checks if the condition of this property is nottrue
.- Returns:
true
if the condition is nottrue
.
-
isTrue
public boolean isTrue()Checks if the condition of this property istrue
.- Returns:
true
if the condition istrue
.
-
invert
Returns the inverse of this conditional property.- Returns:
- The inverse of this conditional property
-