Interface StateChangeListener

  • All Known Implementing Classes:
    GroupItem

    @NonNullByDefault
    public interface StateChangeListener

    This interface must be implemented by all classes that want to be notified about changes in the state of an item.

    The GenericItem class provides the possibility to register such listeners.

    Author:
    Kai Kreuzer - Initial contribution
    • Method Detail

      • stateChanged

        void stateChanged​(Item item,
                          State oldState,
                          State newState)
        This method is called, if a state has changed.
        Parameters:
        item - the item whose state has changed
        oldState - the previous state
        newState - the new state
      • stateUpdated

        void stateUpdated​(Item item,
                          State state)
        This method is called, if a state was updated, but has not changed
        Parameters:
        item - the item whose state was updated
        state - the current state, same before and after the update