Package org.spongepowered.api.state
Interface StateContainer<S extends State<S>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SdefaultState()Optional<StateProperty<?>>findStateProperty(String name)Attempts to retrieve theStatePropertyinstance associated with thisStateContainerby 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 theStatePropertyinstance associated with thisStateContainerby name. If there is noStatePropertyavailable,Optional.empty()is returned.- Parameters:
name- The state property name- Returns:
- The state property, if available
-
-