Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

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


java.lang.Object
  extended by 

org.eclipse.core.databinding.observable.AbstractObservable
      extended by 

org.eclipse.core.databinding.observable.set.ObservableSet
          extended by 
org.eclipse.core.databinding.observable.set.WritableSet
All Implemented Interfaces:
Iterable, Collection, Set, IObservable, IObservableCollection, IObservableSet

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 empty instance in the default realm with a null element type.
WritableSet ( Collection c, Object elementType)
          Constructs a new instance in the default realm containing the elements of the given collection.
WritableSet ( Realm realm)
          Constructs a new empty instance in the given realm and a null element type.
WritableSet ( Realm realm, Collection c, Object elementType)
          Constructs a new instance in the default realm with the given element type, containing the elements of the given collection.
 
Method Summary
 boolean add ( Object o)
           
 boolean addAll ( Collection c)
           
protected  void addListener ( Object listenerType, IObservablesListener listener)
           
 void clear ()
           
protected   Object clone ()
           
protected  void fireEvent ( ObservableEvent event)
           
protected  void firstListenerAdded ()
           
  Realm getRealm ()
           
protected  boolean hasListeners ()
           
protected  void lastListenerRemoved ()
           
 boolean remove ( Object o)
           
 boolean removeAll ( Collection c)
           
protected  void removeListener ( Object listenerType, IObservablesListener listener)
           
 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, addDisposeListener, addStaleListener, checkRealm, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
 
Methods inherited from class java.lang. Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.databinding.observable. IObservable
addChangeListener, addDisposeListener, addStaleListener, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener
 

Constructor Detail

WritableSet

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


WritableSet

public WritableSet(
Collection c,
                   
Object elementType)
Constructs a new instance in the default realm containing the elements of the given collection. Changes to the given collection after calling this method do not affect the contents of the created WritableSet.

Parameters:
c -
elementType - can be null

WritableSet

public WritableSet(
Realm realm)
Constructs a new empty instance in the given realm and a null element type.

Parameters:
realm -

WritableSet

public WritableSet(
Realm realm,
                   
Collection c,
                   
Object elementType)
Constructs a new instance in the default realm with the given element type, containing the elements of the given collection. Changes to the given collection after calling this method do not affect the contents of the created WritableSet.

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

add

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

addAll

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

remove

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

removeAll

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

retainAll

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

clear

public void clear()
Specified by:
clear in interface Collection
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

addListener

protected void addListener(
Object listenerType,
                           
IObservablesListener listener)
Parameters:
listenerType -
listener -

removeListener

protected void removeListener(
Object listenerType,
                              
IObservablesListener listener)
Parameters:
listenerType -
listener -

hasListeners

protected boolean hasListeners()

fireEvent

protected void fireEvent(
ObservableEvent event)

firstListenerAdded

protected void firstListenerAdded()

lastListenerRemoved

protected void lastListenerRemoved()

getRealm

public 
Realm getRealm()
Returns:
Returns the realm.

clone

protected 
Object clone()
                throws 
CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire