com.threerings.presents.dobj
Class NamedSetAdapter<T extends DSet.Entry>

java.lang.Object
  extended by com.threerings.presents.dobj.SetAdapter<T>
      extended by com.threerings.presents.dobj.NamedSetAdapter<T>
All Implemented Interfaces:
ChangeListener, SetListener<T>

public class NamedSetAdapter<T extends DSet.Entry>
extends SetAdapter<T>

A SetAdapter that listens for changes with a given name and calls the 'named' version of the SetListener methods when they occur.


Field Summary
protected  String _name
           
 
Constructor Summary
NamedSetAdapter(String name)
          Listen for DSet events with the given name.
 
Method Summary
 void entryAdded(EntryAddedEvent<T> event)
          Called when an entry added event has been dispatched on an object.
 void entryRemoved(EntryRemovedEvent<T> event)
          Called when an entry removed event has been dispatched on an object.
 void entryUpdated(EntryUpdatedEvent<T> event)
          Called when an entry updated event has been dispatched on an object.
 void namedEntryAdded(EntryAddedEvent<T> event)
           
 void namedEntryRemoved(EntryRemovedEvent<T> event)
           
 void namedEntryUpdated(EntryUpdatedEvent<T> event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

protected final String _name
Constructor Detail

NamedSetAdapter

public NamedSetAdapter(String name)
Listen for DSet events with the given name.

Method Detail

entryAdded

public final void entryAdded(EntryAddedEvent<T> event)
Description copied from interface: SetListener
Called when an entry added event has been dispatched on an object. This will be called after the event has been applied to the object.

Specified by:
entryAdded in interface SetListener<T extends DSet.Entry>
Overrides:
entryAdded in class SetAdapter<T extends DSet.Entry>
Parameters:
event - The event that was dispatched on the object.

namedEntryAdded

public void namedEntryAdded(EntryAddedEvent<T> event)

entryRemoved

public final void entryRemoved(EntryRemovedEvent<T> event)
Description copied from interface: SetListener
Called when an entry removed event has been dispatched on an object. This will be called after the event has been applied to the object.

Specified by:
entryRemoved in interface SetListener<T extends DSet.Entry>
Overrides:
entryRemoved in class SetAdapter<T extends DSet.Entry>
Parameters:
event - The event that was dispatched on the object.

namedEntryRemoved

public void namedEntryRemoved(EntryRemovedEvent<T> event)

entryUpdated

public final void entryUpdated(EntryUpdatedEvent<T> event)
Description copied from interface: SetListener
Called when an entry updated event has been dispatched on an object. This will be called after the event has been applied to the object.

Specified by:
entryUpdated in interface SetListener<T extends DSet.Entry>
Overrides:
entryUpdated in class SetAdapter<T extends DSet.Entry>
Parameters:
event - The event that was dispatched on the object.

namedEntryUpdated

public void namedEntryUpdated(EntryUpdatedEvent<T> event)