com.io7m.r2.core

## Interface R2WatchableType<T>

- Type Parameters:
    `T` - The precise type of value
  All Known Implementing Classes:
    R2Watchable

      public interface R2WatchableType<T>

  A watchable value.

  This is very similar to `Observable` except that it is strongly typed and implementations are required to use weak references to observers so that the observers do not prevent the observed values from being garbage collected.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `watchableAdd(Consumer<T> w)` Add a watcher.
    `void` | `watchableChanged()` Notify all watchers that the value has changed.
    `void` | `watchableRemove(Consumer<T> w)` Remove a watcher.

- - ### Method Detail

    - #### watchableAdd

          void watchableAdd(Consumer<T> w)

      Add a watcher. The watcher will be notified every time `watchableChanged()` is called.
      Parameters:
        `w` - The watcher

    - #### watchableRemove

          void watchableRemove(Consumer<T> w)

      Remove a watcher.
      Parameters:
        `w` - The watcher

    - #### watchableChanged

          void watchableChanged()

      Notify all watchers that the value has changed.

Copyright © 2017 <code@io7m.com> http://io7m.com