public abstract class SimpleSetProperty extends SetProperty
Subclasses must implement these methods:
ISetProperty.getElementType()
doGetSet(Object)
doSetSet(Object, Set, SetDiff)
adaptListener(ISimplePropertyListener)
In addition, we recommended overriding Object.toString()
to return a
description suitable for debugging purposes.
Constructor and Description |
---|
SimpleSetProperty() |
Modifier and Type | Method and Description |
---|---|
abstract INativePropertyListener |
adaptListener(ISimplePropertyListener listener)
Returns a listener capable of adding or removing itself as a listener on
a source object using the the source's "native" listener API.
|
protected abstract Set |
doGetSet(Object source)
Returns a Set with the current contents of the source's set property
|
protected void |
doSetSet(Object source,
Set set)
Updates the property on the source with the specified change.
|
protected abstract void |
doSetSet(Object source,
Set set,
SetDiff diff)
Updates the property on the source with the specified change.
|
protected void |
doUpdateSet(Object source,
SetDiff diff)
Updates the property on the source with the specified change.
|
IObservableSet |
observe(Realm realm,
Object source)
Returns an observable set observing this set property on the given
property source
|
void |
setSet(Object source,
Set set,
SetDiff diff)
Updates the property on the source with the specified change.
|
getSet, observe, observeDetail, setFactory, setFactory, setSet, updateSet, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementType
public IObservableSet observe(Realm realm, Object source)
ISetProperty
realm
- the observable's realmsource
- the property sourceprotected abstract Set doGetSet(Object source)
SetProperty
doGetSet
in class SetProperty
source
- the property sourcepublic final void setSet(Object source, Set set, SetDiff diff)
source
- the property sourceset
- the new setdiff
- a diff describing the changeprotected abstract void doSetSet(Object source, Set set, SetDiff diff)
source
- the property sourceset
- the new setdiff
- a diff describing the changeprotected void doSetSet(Object source, Set set)
SetProperty
doSetSet
in class SetProperty
source
- the property sourceset
- the new setprotected void doUpdateSet(Object source, SetDiff diff)
SetProperty
doUpdateSet
in class SetProperty
source
- the property sourcediff
- a diff describing the changepublic abstract INativePropertyListener adaptListener(ISimplePropertyListener listener)
This method returns null if the source object has no listener APIs for this property.
listener
- the property listener to receive events
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.