Interface IValueProperty<S,T>
-
- Type Parameters:
S
- type of the source objectT
- type of the value of the property
- All Superinterfaces:
IProperty
- All Known Subinterfaces:
IBeanValueProperty<S,T>
,IViewerValueProperty<S,T>
,IWidgetValueProperty<S,T>
- All Known Implementing Classes:
DelegatingValueProperty
,SimpleValueProperty
,ValueProperty
,ViewerValueProperty
,WidgetValueProperty
public interface IValueProperty<S,T> extends IProperty
Interface for value-typed properties- Since:
- 1.2
- See Also:
ValueProperty
,SimpleValueProperty
- Restriction:
- This interface is not intended to be implemented by clients.
Clients should instead subclass one of the classes that
implement this interface.
Authors of extensions to the databinding framework may extend this interface and indirectly implement it, but if doing so must also extend one of the framework classes. (Use an API problem filter to suppress the resulting warning.)
Direct implementers of this interface outside of the framework will be broken in future releases when methods are added to this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getValue(S source)
Returns the current value of this property on the specified property source.Object
getValueType()
Returns the value type of the property, ornull
if untyped.<E> IListProperty<S,E>
list(IListProperty<? super T,E> detailList)
Returns the nested combination of this property and the specified detail list property.<K,V>
IMapProperty<S,K,V>map(IMapProperty<? super T,K,V> detailMap)
Returns the nested combination of this property and the specified detail map property.IObservableValue<T>
observe(Realm realm, S source)
Returns an observable value observing this value property on the given property sourceIObservableValue<T>
observe(S source)
Returns an observable value observing this value property on the given property source.<M extends S>
IObservableList<T>observeDetail(IObservableList<M> master)
Returns an observable list on the master observable's realm which tracks this property on each element ofmaster
.<K,V extends S>
IObservableMap<K,T>observeDetail(IObservableMap<K,V> 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.<M extends S>
IObservableMap<M,T>observeDetail(IObservableSet<M> 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.<M extends S>
IObservableValue<T>observeDetail(IObservableValue<M> master)
Returns an observable value on the master observable's realm which tracks this property on the current value ofmaster
.<E> ISetProperty<S,E>
set(ISetProperty<? super T,E> detailSet)
Returns the nested combination of this property and the specified detail set property.void
setValue(S source, T value)
Sets this property on the specified property source to the specified value.<M> IValueProperty<S,M>
value(IValueProperty<? super T,M> detailValue)
Returns the nested combination of this property and the specified detail value property.IObservableFactory<S,IObservableValue<T>>
valueFactory()
Returns a factory for creating observable values tracking this property of a particular property source.IObservableFactory<S,IObservableValue<T>>
valueFactory(Realm realm)
Returns a factory for creating observable values in the given realm, tracking this property of a particular property source.
-
-
-
Method Detail
-
getValueType
Object getValueType()
Returns the value type of the property, ornull
if untyped.- Returns:
- the value type of the property, or
null
if untyped.
-
getValue
T getValue(S source)
Returns the current value of this property on the specified property source.- Parameters:
source
- the property source (may be null)- Returns:
- the current value of this property on the specified property source.
- Since:
- 1.3
-
setValue
void setValue(S source, T value)
Sets this property on the specified property source to the specified value.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.- Parameters:
source
- the property source (may be null)value
- the new property value- Since:
- 1.3
-
observe
IObservableValue<T> observe(S source)
Returns an observable value observing this value property on the given property source.- Parameters:
source
- the property source- Returns:
- an observable value observing this value property on the given property source
-
observe
IObservableValue<T> observe(Realm realm, S source)
Returns an observable value observing this value property on the given property source- Parameters:
realm
- the observable's realmsource
- the property source- Returns:
- an observable value observing this value property on the given property source
-
valueFactory
IObservableFactory<S,IObservableValue<T>> valueFactory()
Returns a factory for creating observable values tracking this property of a particular property source.- Returns:
- a factory for creating observable values tracking this property of a particular property source.
-
valueFactory
IObservableFactory<S,IObservableValue<T>> valueFactory(Realm realm)
Returns a factory for creating observable values in the given realm, tracking this property of a particular property source.- Parameters:
realm
- the realm- Returns:
- a factory for creating observable values in the given realm, tracking this property of a particular property source.
-
observeDetail
<M extends S> IObservableValue<T> observeDetail(IObservableValue<M> master)
Returns an observable value on the master observable's realm which tracks this property on the current value ofmaster
.- Parameters:
master
- the master observable- Returns:
- an observable value which tracks this property of the current
value of
master
.
-
observeDetail
<M extends S> IObservableList<T> observeDetail(IObservableList<M> master)
Returns an observable list on the master observable's realm which tracks this property on each element ofmaster
.- Parameters:
master
- the master observable- Returns:
- an observable list which tracks this property on each element of the master observable.
-
observeDetail
<M extends S> IObservableMap<M,T> observeDetail(IObservableSet<M> 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.- Parameters:
master
- the master observable- Returns:
- an observable map that tracks the current value of this property for the elements in the given set.
-
observeDetail
<K,V extends S> IObservableMap<K,T> observeDetail(IObservableMap<K,V> 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.- Parameters:
master
- the master observable- Returns:
- an observable map on the master observable's realm which tracks the current value of this property for the elements in the given map's values collection
-
value
<M> IValueProperty<S,M> value(IValueProperty<? super T,M> detailValue)
Returns the nested combination of this property and the specified detail value property. Value modifications made through the returned property are delegated to the detail property, using the value of this property as the source.- Parameters:
detailValue
- the detail property- Returns:
- the nested combination of the master and detail properties
-
list
<E> IListProperty<S,E> list(IListProperty<? super T,E> detailList)
Returns the nested combination of this property and the specified detail list property. List modifications made through the returned property are delegated to the detail property, using the value of the master property as the source.- Parameters:
detailList
- the detail property- Returns:
- the nested combination of the master value and detail list properties
-
set
<E> ISetProperty<S,E> set(ISetProperty<? super T,E> detailSet)
Returns the nested combination of this property and the specified detail set property. Set modifications made through the returned property are delegated to the detail property, using the value of the master property as the source.- Parameters:
detailSet
- the detail property- Returns:
- the nested combination of the master value and detail set properties
-
map
<K,V> IMapProperty<S,K,V> map(IMapProperty<? super T,K,V> detailMap)
Returns the nested combination of this property and the specified detail map property. Map modifications made through the returned property are delegated to the detail property, using the value of the master property as the source.- Parameters:
detailMap
- the detail property- Returns:
- the nested combination of the master value and detial map properties
-
-