org.appng.api.observe

## Interface Observable<T>

- Type Parameters:
    `T` - the type which is observed
  All Known Subinterfaces:
    Document
  All Known Implementing Classes:
    ObservableDelegate, SimpleDocument

      public interface Observable<T>

  An Observable can be observed by multiple `Observer`s and notify them of changes by firing an `Observable.Event` .
  Author:
    Matthias Müller

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `Observable.Event` An `Observable` notifies it's `Observer`s by firing an `Observable.Event`.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addObserver(Observer<? super T> observer)` Adds an `Observer`.
    `void` | `notifyObservers(Observable.Event event)` Notifies the `Observer`s.
    `boolean` | `removeObserver(Observer<? super T> observer)` Removes an `Observer`.

- - ### Method Detail

    - #### addObserver

          boolean addObserver(Observer<? super T> observer)

      Adds an `Observer`.
      Parameters:
        `observer` - the `Observer` to be added
      Returns:
        `true` if adding the `Observer` was successful, `false` otherwise

    - #### removeObserver

          boolean removeObserver(Observer<? super T> observer)

      Removes an `Observer`.
      Parameters:
        `observer` - the `Observer` to be removed
      Returns:
        `true` if removing the `Observer` was successful, `false` otherwise

    - #### notifyObservers

          void notifyObservers(Observable.Event event)

      Notifies the `Observer`s.
      Parameters:
        `event` - an `Observable.Event`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.