Package jsl.observers

Interface ObservableIfc

    • Method Detail

      • addObserver

        void addObserver​(ObserverIfc observer)
        Allows the adding (attaching) of an observer to the observable
        Parameters:
        observer - the observer to attach
      • deleteObserver

        void deleteObserver​(ObserverIfc observer)
        Allows the deletion (removing) of an observer from the observable
        Parameters:
        observer - the observer to delete
      • contains

        boolean contains​(ObserverIfc observer)
        Returns true if the observer is already attached
        Parameters:
        observer - the observer to check
        Returns:
        true if attached
      • deleteObservers

        void deleteObservers()
        Deletes all the observers from the observable
      • countObservers

        int countObservers()
        Returns how many observers are currently observing the observable
        Returns:
        number of observers