com.h3c.util.observer

## Class StrongReferenceListenerStore<T>

- java.lang.Object
- - com.h3c.util.observer.StrongReferenceListenerStore<T>

- Type Parameters:
    `T` - type of the listener.
  All Implemented Interfaces:
    Store<T>

      public class StrongReferenceListenerStore<T>
      extends Object
      implements Store<T>

  Strong reference listener store.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StrongReferenceListenerStore()` Creates a listener store.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(T listener)` Adds an item to the store.
    `boolean` | `contains(T listener)` Verifies if the given item is contained in the store.
    `Collection<T>` | `getContent()` Gets an unmodifiable snapshot of the store.
    `void` | `remove(T listener)` Removes an item from the store.

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

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

- - ### Constructor Detail

    - #### StrongReferenceListenerStore

          public StrongReferenceListenerStore()

      Creates a listener store.

  - ### Method Detail

    - #### add

          public void add(T listener)

      Description copied from interface: `Store`
      Adds an item to the store.
      Specified by:
        `add` in interface `Store<T>`
      Parameters:
        `listener` - listener to add.

    - #### remove

          public void remove(T listener)

      Description copied from interface: `Store`
      Removes an item from the store.
      Specified by:
        `remove` in interface `Store<T>`
      Parameters:
        `listener` - listener to remove.

    - #### contains

          public boolean contains(T listener)

      Description copied from interface: `Store`
      Verifies if the given item is contained in the store.
      Specified by:
        `contains` in interface `Store<T>`
      Parameters:
        `listener` - item to check.
      Returns:
        `true` if `item` belongs to the store, `false` otherwise.

    - #### getContent

          public Collection<T> getContent()

      Description copied from interface: `Store`
      Gets an unmodifiable snapshot of the store. The returned collection must not be affected by any addition or deletion that takes place after this method has been executed.
      Specified by:
        `getContent` in interface `Store<T>`
      Returns:
        the store content.

Copyright © 2014. All Rights Reserved.