Interface State<S extends State<S>>

    • Method Detail

      • cycleStateProperty

        <T extends Comparable<T>> Optional<S> cycleStateProperty​(StateProperty<T> stateProperty)
        Cycles to the next possible value of the StateProperty and returns the new State. Returns Optional.empty() if the state property or the value isn't supported.
        Type Parameters:
        T - The type of cycleable value
        Parameters:
        stateProperty - The state property
        Returns:
        The cycled state if successful
      • cycleStateProperty

        default <T extends Comparable<T>> Optional<S> cycleStateProperty​(Supplier<? extends StateProperty<T>> stateProperty)
        Cycles to the next possible value of the StateProperty and returns the new State. Returns Optional.empty() if the state property or the value isn't supported.
        Type Parameters:
        T - The type of cycleable value
        Parameters:
        stateProperty - The state property
        Returns:
        The cycled state if successful
      • cycleValue

        <T extends Cycleable<T>> Optional<S> cycleValue​(Key<? extends Value<T>> key)
        Cycles to the next possible value of the Key and returns the new State. Returns Optional.empty() if the key or the value isn't supported.
        Type Parameters:
        T - The type of cycleable value
        Parameters:
        key - The key
        Returns:
        The cycled state if successful
      • cycleValue

        default <T extends Cycleable<T>> Optional<S> cycleValue​(Supplier<? extends Key<? extends Value<T>>> key)
        Cycles to the next possible value of the Key and returns the new State. Returns Optional.empty() if the key or the value isn't supported.
        Type Parameters:
        T - The type of cycleable value
        Parameters:
        key - The key
        Returns:
        The cycled state if successful
      • statePropertyValues

        Collection<?> statePropertyValues()
        Gets an immutable Collection of all the values for all StatePropertys for this State.
        Returns:
        An immutable collection of all the values for all applicable properties
      • statePropertyMap

        Map<StateProperty<?>,​?> statePropertyMap()
        Gets an immutable or unmodifiable Map of the known StatePropertys to their current values for this State.
        Returns:
        The immutable map of state properties to their values representing this state
      • toString

        String toString()
        The String representation of this State can be considered to be equal to the representation of this state as a serialized form.
        Overrides:
        toString in class Object
        Returns:
        The serialized string