Interface Stateful<S extends Enum>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean hasSubscribers()
      Returns true if there are subscribers observing the state stream.
      boolean isState​(S state)
      Check if the given state is the same as the current one.
      S state()
      Returns the current state.
      rx.Observable<S> states()
      Returns a infinite observable which gets updated when the state of the component changes.
    • Method Detail

      • states

        rx.Observable<S> states()
        Returns a infinite observable which gets updated when the state of the component changes.
        Returns:
        a Observable updated with state transitions.
      • state

        S state()
        Returns the current state.
        Returns:
        the current state.
      • isState

        boolean isState​(S state)
        Check if the given state is the same as the current one.
        Parameters:
        state - the stats to check against.
        Returns:
        true if it is the same, false otherwise.
      • hasSubscribers

        boolean hasSubscribers()
        Returns true if there are subscribers observing the state stream.
        Returns:
        true if at least one does, false otherwise.