public abstract class ValueProperty extends Object implements IValueProperty
Constructor and Description |
---|
ValueProperty() |
Modifier and Type | Method and Description |
---|---|
protected Object |
doGetValue(Object source)
Returns the value of the property on the specified source object
|
protected void |
doSetValue(Object source,
Object value)
Sets the source's value property to the specified vlaue
|
Object |
getValue(Object source)
By default, this method returns
null in case the source
object is itself null . |
IListProperty |
list(IListProperty detailList)
Returns the nested combination of this property and the specified detail
list property.
|
IMapProperty |
map(IMapProperty detailMap)
Returns the nested combination of this property and the specified detail
map property.
|
IObservableValue |
observe(Object source)
Returns an observable value observing this value property on the given
property source.
|
IObservableList |
observeDetail(IObservableList master)
Returns an observable list on the master observable's realm which tracks
this property on each element of
master . |
IObservableMap |
observeDetail(IObservableMap master)
Returns an observable map on the master observable's realm where the
map's key set is the same as the master observable map, and where each
value is the property value of the corresponding value in the master
observable map.
|
IObservableMap |
observeDetail(IObservableSet master)
Returns an observable map on the master observable's realm where the
map's key set is the specified master set, and where each key maps to the
current property value for each element.
|
IObservableValue |
observeDetail(IObservableValue master)
Returns an observable value on the master observable's realm which tracks
this property on the current value of
master . |
ISetProperty |
set(ISetProperty detailSet)
Returns the nested combination of this property and the specified detail
set property.
|
void |
setValue(Object source,
Object value)
Sets this property on the specified property source to the specified
value.
|
IValueProperty |
value(IValueProperty detailValue)
Returns the nested combination of this property and the specified detail
value property.
|
IObservableFactory |
valueFactory()
Returns a factory for creating observable values tracking this property
of a particular property source.
|
IObservableFactory |
valueFactory(Realm realm)
Returns a factory for creating observable values in the given realm,
tracking this property of a particular property source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValueType, observe
public Object getValue(Object source)
null
in case the source
object is itself null
. Otherwise, this method delegates to
doGetValue(Object)
.
Clients may override this method if they e.g. want to return a specific
default value in case the source object is null
.
getValue
in interface IValueProperty
source
- the property source (may be null)doGetValue(Object)
protected Object doGetValue(Object source)
source
- the property sourcepublic final void setValue(Object source, Object value)
IValueProperty
Note: This method is made available to facilitate basic property
access. However if the property source lacks property change
notification, then observables on the source object may not be notified
of the change. In most cases it is preferable to call
IObservableValue.setValue(Object)
on the observable instead.
setValue
in interface IValueProperty
source
- the property source (may be null)value
- the new property valueprotected void doSetValue(Object source, Object value)
source
- the property sourcevalue
- the new valuepublic IObservableValue observe(Object source)
IValueProperty
observe
in interface IValueProperty
source
- the property sourcepublic IObservableFactory valueFactory()
IValueProperty
valueFactory
in interface IValueProperty
public IObservableFactory valueFactory(Realm realm)
IValueProperty
valueFactory
in interface IValueProperty
realm
- the realmpublic IObservableValue observeDetail(IObservableValue master)
IValueProperty
master
.observeDetail
in interface IValueProperty
master
- the master observablemaster
.public IObservableList observeDetail(IObservableList master)
IValueProperty
master
.observeDetail
in interface IValueProperty
master
- the master observablepublic IObservableMap observeDetail(IObservableSet master)
IValueProperty
observeDetail
in interface IValueProperty
master
- the master observablepublic IObservableMap observeDetail(IObservableMap master)
IValueProperty
observeDetail
in interface IValueProperty
master
- the master observablepublic final IValueProperty value(IValueProperty detailValue)
IValueProperty
value
in interface IValueProperty
detailValue
- the detail propertypublic final IListProperty list(IListProperty detailList)
IValueProperty
list
in interface IValueProperty
detailList
- the detail propertypublic final ISetProperty set(ISetProperty detailSet)
IValueProperty
set
in interface IValueProperty
detailSet
- the detail propertypublic final IMapProperty map(IMapProperty detailMap)
IValueProperty
map
in interface IValueProperty
detailMap
- the detail property
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.