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()java.util.Optional<StateProperty<?>>findStateProperty(java.lang.String name)Attempts to retrieve theStatePropertyinstance associated with thisStateContainerby name.java.util.Collection<StateProperty<?>>stateProperties()ImmutableList<S>validStates()
-
-
-
Method Detail
-
validStates
ImmutableList<S> validStates()
-
defaultState
S defaultState()
-
stateProperties
java.util.Collection<StateProperty<?>> stateProperties()
-
findStateProperty
java.util.Optional<StateProperty<?>> findStateProperty(java.lang.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
-
-