Class AbstractBooleanProperty
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.property.type.AbstractBooleanProperty
- All Implemented Interfaces:
BattleProperty<Boolean>
- Direct Known Subclasses:
ExitableProperty
,FullHealProperty
,NoCritsProperty
,RaiseToCapProperty
,TeamPreviewProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the default value when not supplied If returning an empty optional this means it isn't always requiredGets a new instanceof thePropertyValue<T>
Attempts to parse the object into aPropertyValue<T>
Will returnOptional.empty()
if fails to parseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.battles.api.rules.BattleProperty
getId, requiredByClient
-
Constructor Details
-
AbstractBooleanProperty
public AbstractBooleanProperty()
-
-
Method Details
-
parse
Description copied from interface:BattleProperty
Attempts to parse the object into aPropertyValue<T>
Will returnOptional.empty()
if fails to parse- Specified by:
parse
in interfaceBattleProperty<Boolean>
- Parameters:
o
- The object being parsed- Returns:
- The optional
PropertyValue<T>
-
getDefault
Description copied from interface:BattleProperty
Gets the default value when not supplied If returning an empty optional this means it isn't always required- Specified by:
getDefault
in interfaceBattleProperty<Boolean>
- Returns:
- The default
Optional<PropertyValue<T>>
-
getInstance
Description copied from interface:BattleProperty
Gets a new instanceof thePropertyValue<T>
- Specified by:
getInstance
in interfaceBattleProperty<Boolean>
- Returns:
- The new value instance
-