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()
java.util.Optional<StateProperty<?>>
findStateProperty(java.lang.String name)
Attempts to retrieve theStateProperty
instance associated with thisStateContainer
by 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 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
-
-