Package org.spongepowered.api.state
Interface StateContainer<S extends State<S>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description S
defaultState()
Optional<StateProperty<?>>
findStateProperty(String name)
Attempts to retrieve theStateProperty
instance associated with thisStateContainer
by name.Collection<StateProperty<?>>
stateProperties()
ImmutableList<S>
validStates()
-
-
-
Method Detail
-
validStates
ImmutableList<S> validStates()
-
defaultState
S defaultState()
-
stateProperties
Collection<StateProperty<?>> stateProperties()
-
findStateProperty
Optional<StateProperty<?>> findStateProperty(String name)
Attempts to retrieve theStateProperty
instance associated with thisStateContainer
by name. If there is noStateProperty
available,Optional.empty()
is returned.- Parameters:
name
- The state property name- Returns:
- The state property, if available
-
-