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

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 ObservableSet

java.lang.Object
  extended by 

org.eclipse.core.databinding.observable.AbstractObservable
      extended by 
org.eclipse.core.databinding.observable.set.ObservableSet
All Implemented Interfaces:
Iterable, Collection, Set, IObservable, IObservableCollection, IObservableSet
Direct Known Subclasses:
ListToSetAdapter, MappedSet, UnionSet, WritableSet

public abstract class ObservableSet
extends AbstractObservable
implements IObservableSet

Abstract 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
protected   Object elementType
           
protected   Set wrappedSet
           
 
Constructor Summary
protected ObservableSet ( Realm realm, Set wrappedSet, Object elementType)
           
protected ObservableSet ( Set wrappedSet, Object elementType)
           
 
Method Summary
 boolean add ( Object o)
           
 boolean addAll ( Collection c)
           
protected  void addListener ( Object listenerType, IObservablesListener listener)
           
 void addSetChangeListener ( ISetChangeListener listener)
           
 void clear ()
           
protected   Object clone ()
           
 boolean contains ( Object o)
           
 boolean containsAll ( Collection c)
           
 void dispose ()
          Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects.
 boolean equals ( Object o)
           
protected  void fireChange ()
           
protected  void fireEvent ( ObservableEvent event)
           
protected  void fireSetChange ( SetDiff diff)
           
protected  void firstListenerAdded ()
           
  Object getElementType ()
          Returns the element type of this observable collection, or null if this observable collection is untyped.
  Realm getRealm ()
           
protected  void getterCalled ()
           
 int hashCode ()
           
protected  boolean hasListeners ()
           
 boolean isEmpty ()
           
 boolean isStale ()
          Returns whether the state of this observable is stale and is expected to change soon.
  Iterator iterator ()
           
protected  void lastListenerRemoved ()
           
 boolean remove ( Object o)
           
 boolean removeAll ( Collection c)
           
protected  void removeListener ( Object listenerType, IObservablesListener listener)
           
 void removeSetChangeListener ( ISetChangeListener listener)
           
 boolean retainAll ( Collection c)
           
 void setStale (boolean stale)
           
protected  void setWrappedSet ( Set wrappedSet)
           
 int size ()
           
  Object[] toArray ()
           
  Object[] toArray ( Object[] a)
           
  String 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
 

Field Detail

wrappedSet

protected 
Set wrappedSet

elementType

protected 
Object elementType
Constructor Detail

ObservableSet

protected ObservableSet(
Set wrappedSet,
                        
Object elementType)

ObservableSet

protected ObservableSet(
Realm realm,
                        
Set wrappedSet,
                        
Object elementType)
Method Detail

addSetChangeListener

public void addSetChangeListener(
ISetChangeListener listener)
Specified by:
addSetChangeListener in interface IObservableSet

removeSetChangeListener

public void removeSetChangeListener(
ISetChangeListener listener)
Specified by:
removeSetChangeListener in interface IObservableSet

fireSetChange

protected void fireSetChange(
SetDiff diff)

contains

public boolean contains(
Object o)
Specified by:
contains in interface Collection
Specified by:
contains in interface Set
Specified by:
contains in interface IObservableSet

containsAll

public boolean containsAll(
Collection c)
Specified by:
containsAll in interface Collection
Specified by:
containsAll in interface Set
Specified by:
containsAll in interface IObservableSet

equals

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

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection
Specified by:
hashCode in interface Set
Specified by:
hashCode in interface IObservableSet
Overrides:
hashCode in class Object

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection
Specified by:
isEmpty in interface Set
Specified by:
isEmpty in interface IObservableSet

iterator

public 
Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface Set
Specified by:
iterator in interface IObservableSet

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface Set
Specified by:
size in interface IObservableSet

toArray

public 
Object[] toArray()
Specified by:
toArray in interface Collection
Specified by:
toArray in interface Set
Specified by:
toArray in interface IObservableSet

toArray

public 
Object[] toArray(
Object[] a)
Specified by:
toArray in interface Collection
Specified by:
toArray in interface Set
Specified by:
toArray in interface IObservableSet

toString

public 
String toString()
Overrides:
toString in class Object

getterCalled

protected void getterCalled()

add

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

addAll

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

remove

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

removeAll

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

retainAll

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

clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface Set

isStale

public boolean isStale()
Description copied from interface: IObservable
Returns whether the state of this observable is stale and is expected to change soon. A non-stale observable that becomes stale will notify its stale listeners. A stale object that becomes non-stale does so by changing its state and notifying its change listeners, it does not notify its stale listeners about becoming non-stale. Clients that do not expect asynchronous changes may ignore staleness of observable objects.

Specified by:
isStale in interface IObservable
Returns:
Returns the stale state.

setStale

public void setStale(boolean stale)
Parameters:
stale - The stale state to set. This will fire a stale event if the given boolean is true and this observable set was not already stale.

setWrappedSet

protected void setWrappedSet(
Set wrappedSet)
Parameters:
wrappedSet - The wrappedSet to set.

fireChange

protected void fireChange()
Overrides:
fireChange in class AbstractObservable

dispose

public void dispose()
Description copied from interface: IObservable
Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects.

Specified by:
dispose in interface IObservable
Overrides:
dispose in class AbstractObservable

getElementType

public 
Object getElementType()
Description copied from interface: IObservableCollection
Returns the element type of this observable collection, or null if this observable collection is untyped.

Specified by:
getElementType in interface IObservableCollection
Specified by:
getElementType in interface IObservableSet
Returns:
the element type or null if untyped

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