Eclipse Platform
Release 3.3

org.eclipse.core.databinding.observable.set
Class WritableSet

java.lang.Object
  extended byorg.eclipse.core.databinding.observable.ChangeManager
      extended byorg.eclipse.core.databinding.observable.AbstractObservable
          extended byorg.eclipse.core.databinding.observable.set.ObservableSet
              extended byorg.eclipse.core.databinding.observable.set.WritableSet
All Implemented Interfaces:
Collection, IObservable, IObservableCollection, IObservableSet, Set

public class WritableSet
extends ObservableSet

Mutable (writable) implementation of IObservableSet.

This class is thread safe. All state accessing methods must be invoked from the current realm. Methods for adding and removing listeners may be invoked from any thread.

Since:
1.0

Field Summary
 
Fields inherited from class org.eclipse.core.databinding.observable.set.ObservableSet
elementType, wrappedSet
 
Constructor Summary
WritableSet()
          Constructs a new instance with the default realm, empty list, and a null element type.
WritableSet(Collection c, Object elementType)
          Construts a new instance with the default realm.
WritableSet(Realm realm)
          Constructs a new instance with an empty list and a null element type.
WritableSet(Realm realm, Collection c, Object elementType)
          Constructs a new instance.
 
Method Summary
 boolean add(Object o)
           
 boolean addAll(Collection c)
           
 void clear()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection c)
           
 boolean retainAll(Collection c)
           
static WritableSet withElementType(Object elementType)
           
 
Methods inherited from class org.eclipse.core.databinding.observable.set.ObservableSet
addSetChangeListener, contains, containsAll, dispose, equals, fireChange, fireSetChange, getElementType, getterCalled, hashCode, isEmpty, isStale, iterator, removeSetChangeListener, setStale, setWrappedSet, size, toArray, toArray, toString
 
Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable
addChangeListener, addListener, addStaleListener, checkRealm, fireEvent, fireStale, firstListenerAdded, getRealm, hasListeners, lastListenerRemoved, removeChangeListener, removeListener, removeStaleListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.databinding.observable.IObservable
addChangeListener, addStaleListener, getRealm, removeChangeListener, removeStaleListener
 

Constructor Detail

WritableSet

public WritableSet()
Constructs a new instance with the default realm, empty list, and a null element type.


WritableSet

public WritableSet(Collection c,
                   Object elementType)
Construts a new instance with the default realm.

Parameters:
c -
elementType - can be null

WritableSet

public WritableSet(Realm realm)
Constructs a new instance with an empty list and a null element type.

Parameters:
realm -

WritableSet

public WritableSet(Realm realm,
                   Collection c,
                   Object elementType)
Constructs a new instance.

Parameters:
realm -
c -
elementType - can be null
Method Detail

add

public boolean add(Object o)
Specified by:
add in interface IObservableSet
Overrides:
add in class ObservableSet

addAll

public boolean addAll(Collection c)
Specified by:
addAll in interface IObservableSet
Overrides:
addAll in class ObservableSet

remove

public boolean remove(Object o)
Specified by:
remove in interface IObservableSet
Overrides:
remove in class ObservableSet

removeAll

public boolean removeAll(Collection c)
Specified by:
removeAll in interface IObservableSet
Overrides:
removeAll in class ObservableSet

retainAll

public boolean retainAll(Collection c)
Specified by:
retainAll in interface IObservableSet
Overrides:
retainAll in class ObservableSet

clear

public void clear()
Specified by:
clear in interface Set
Overrides:
clear in class ObservableSet

withElementType

public static WritableSet withElementType(Object elementType)
Parameters:
elementType - can be null
Returns:
new instance with the default realm

Eclipse Platform
Release 3.3

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.