T
- The type of the propertypublic interface BattleProperty<T>
Modifier and Type | Method and Description |
---|---|
java.util.Optional<PropertyValue<T>> |
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<T> |
getInstance()
Gets a new instanceof the
PropertyValue |
java.util.Optional<PropertyValue<T>> |
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
|
java.lang.String getId()
boolean requiredByClient()
java.util.Optional<PropertyValue<T>> parse(java.lang.Object o)
PropertyValue
Will return Optional.empty()
if fails to parseo
- The object being parsedPropertyValue
java.util.Optional<PropertyValue<T>> getDefault()
Optional>
PropertyValue<T> getInstance()
PropertyValue