Class TierProperty
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.property.TierProperty
- All Implemented Interfaces:
BattleProperty<Tier>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the default value when not supplied If returning an empty optional this means it isn't always requiredgetId()
The id of the propertyGets a new instanceof thePropertyValue<T>
Attempts to parse the object into aPropertyValue<T>
Will returnOptional.empty()
if fails to parseboolean
If the property's value is required by the client for UI logic
-
Constructor Details
-
TierProperty
public TierProperty()
-
-
Method Details
-
getId
Description copied from interface:BattleProperty
The id of the property- Specified by:
getId
in interfaceBattleProperty<Tier>
- Returns:
- The id
-
requiredByClient
public boolean requiredByClient()Description copied from interface:BattleProperty
If the property's value is required by the client for UI logic- Specified by:
requiredByClient
in interfaceBattleProperty<Tier>
- Returns:
- True if required by the client
-
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<Tier>
- 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<Tier>
- Returns:
- The default
Optional<PropertyValue<T>>
-
getInstance
Description copied from interface:BattleProperty
Gets a new instanceof thePropertyValue<T>
- Specified by:
getInstance
in interfaceBattleProperty<Tier>
- Returns:
- The new value instance
-