Interface StateModel

All Known Subinterfaces:
ColorCyclePlayer, Player
All Known Implementing Classes:
AbstractPlayer

public interface StateModel
Generic interface for Objects with state.
Author:
Werner Randelshofer, Hausmatt 10, CH-6405 Goldau, Switzerland
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a listener that wants to be notified about state changes of the model.
    int
    Returns the current state of the model.
    void
    Removes a listener.
  • Method Details

    • addStateListener

      void addStateListener(StateListener listener)
      Adds a listener that wants to be notified about state changes of the model.
    • removeStateListener

      void removeStateListener(StateListener listener)
      Removes a listener.
    • getState

      int getState()
      Returns the current state of the model.