public class TierProperty extends java.lang.Object implements BattleProperty<Tier>
Constructor and Description |
---|
TierProperty() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<PropertyValue<Tier>> |
getDefault()
Gets the default value when not supplied
If returning an empty optional this means it isn't always required
|
java.lang.String |
getId()
The id of the property
|
PropertyValue<Tier> |
getInstance()
Gets a new instanceof the
PropertyValue |
java.util.Optional<PropertyValue<Tier>> |
parse(java.lang.Object o)
Attempts to parse the object into a
PropertyValue
Will return Optional.empty() if fails to parse |
boolean |
requiredByClient()
If the property's value is required by the client for UI logic
|
public java.lang.String getId()
BattleProperty
getId
in interface BattleProperty<Tier>
public boolean requiredByClient()
BattleProperty
requiredByClient
in interface BattleProperty<Tier>
public java.util.Optional<PropertyValue<Tier>> parse(java.lang.Object o)
BattleProperty
PropertyValue
Will return Optional.empty()
if fails to parseparse
in interface BattleProperty<Tier>
o
- The object being parsedPropertyValue
public java.util.Optional<PropertyValue<Tier>> getDefault()
BattleProperty
getDefault
in interface BattleProperty<Tier>
Optional>
public PropertyValue<Tier> getInstance()
BattleProperty
PropertyValue
getInstance
in interface BattleProperty<Tier>