Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.utils
Class IndexedChangeHub

    java.lang.Object
      org.biojava.utils.IndexedChangeHub

All Implemented Interfaces:
  ChangeHub

    public abstract class IndexedChangeHub

extends Object
implements ChangeHub

implements Changeable support with a ChangeHub that stores ChangeListener by key.

Since:
  1.3
Author:
  Thomas Down (original implementation), David Huen (refactoring)

Nested Class Summary
`protected class` | `IndexedChangeHub.ListenerMemento`

Constructor Summary
`IndexedChangeHub()`

Method Summary
`void` | `addListener(Object key, ChangeListener listener, ChangeType ct)` add a ChangeListener associated with given key.
`protected void` | `diddleQueue()`
`void` | `firePostChange(Object key, ChangeEvent cev)` invoke the firePostChangeEvent on all ChangeListeners associated with a specific key.
`void` | `firePreChange(Object key, ChangeEvent cev)` invoke the firePreChangeEvent on all ChangeListeners associated with a specific key.
`protected abstract boolean` | `isMyChangeEvent(ChangeEvent cev, IndexedChangeHub.ListenerMemento lm)`
`void` | `removeListener(Object key, ChangeListener listener, ChangeType ct)` remove a ChangeListener associated with given key.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IndexedChangeHub

    public IndexedChangeHub()

Method Detail

### isMyChangeEvent

    protected abstract boolean isMyChangeEvent(ChangeEvent cev,
                                               IndexedChangeHub.ListenerMemento lm)

### addListener

    public void addListener(Object key,
                            ChangeListener listener,
                            ChangeType ct)

  Description copied from interface: `ChangeHub`
  add a ChangeListener associated with given key.

  Specified by:
    `addListener` in interface `ChangeHub`

### removeListener

    public void removeListener(Object key,
                               ChangeListener listener,
                               ChangeType ct)

  Description copied from interface: `ChangeHub`
  remove a ChangeListener associated with given key.

  Specified by:
    `removeListener` in interface `ChangeHub`

### firePreChange

    public void firePreChange(Object key,
                              ChangeEvent cev)
                       throws ChangeVetoException

  Description copied from interface: `ChangeHub`
  invoke the firePreChangeEvent on all ChangeListeners associated with a specific key.

  Specified by:
    `firePreChange` in interface `ChangeHub`
  Throws:
    `ChangeVetoException`

### firePostChange

    public void firePostChange(Object key,
                               ChangeEvent cev)

  Description copied from interface: `ChangeHub`
  invoke the firePostChangeEvent on all ChangeListeners associated with a specific key.

  Specified by:
    `firePostChange` in interface `ChangeHub`

### diddleQueue

    protected void diddleQueue()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD