org.appng.api.observe.impl

## Class ObservableDelegate<T extends Observable<T>>

- java.lang.Object
- - org.appng.api.observe.impl.ObservableDelegate<T>

- Type Parameters:
    `T` - the type which is observed
  All Implemented Interfaces:
    Observable<T>

      public class ObservableDelegate<T extends Observable<T>>
      extends Object
      implements Observable<T>

  `Observable`-implementation which delegates to a given Observable.
  Author:
    Matthias Müller

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.appng.api.observe.Observable

      `Observable.Event`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ObservableDelegate()`
    `` | `ObservableDelegate(T observable)` Creates a new `ObservableDelegate` which delegates to the given `Observable`.

  - ### Method Summary

    All Methods Instance Methods Concrete 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`.
    `protected void` | `setObeservable(T observable)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ObservableDelegate

          public ObservableDelegate(T observable)

      Creates a new `ObservableDelegate` which delegates to the given `Observable`.
      Parameters:
        `observable` - the `Observable` to delegate to.

    - #### ObservableDelegate

          protected ObservableDelegate()

  - ### Method Detail

    - #### setObeservable

          protected void setObeservable(T observable)

    - #### addObserver

          public boolean addObserver(Observer<? super T> observer)

      Description copied from interface: `Observable`
      Adds an `Observer`.
      Specified by:
        `addObserver` in interface `Observable<T extends Observable<T>>`
      Parameters:
        `observer` - the `Observer` to be added
      Returns:
        `true` if adding the `Observer` was successful, `false` otherwise

    - #### removeObserver

          public boolean removeObserver(Observer<? super T> observer)

      Description copied from interface: `Observable`
      Removes an `Observer`.
      Specified by:
        `removeObserver` in interface `Observable<T extends Observable<T>>`
      Parameters:
        `observer` - the `Observer` to be removed
      Returns:
        `true` if removing the `Observer` was successful, `false` otherwise

    - #### notifyObservers

          public void notifyObservers(Observable.Event event)

      Description copied from interface: `Observable`
      Notifies the `Observer`s.
      Specified by:
        `notifyObservers` in interface `Observable<T extends Observable<T>>`
      Parameters:
        `event` - an `Observable.Event`

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