Interface IListProperty<S,E>

Type Parameters:
S - type of the source object
E - type of the elements in the list
All Superinterfaces:
IProperty
All Known Subinterfaces:
IBeanListProperty<S,E>, IViewerListProperty<S,E>, IWidgetListProperty<S,E>
All Known Implementing Classes:
DelegatingListProperty, ListProperty, MultiListProperty, SimpleListProperty, ViewerListProperty, WidgetListProperty

public interface IListProperty<S,E> extends IProperty
Interface for list-typed properties.
Since:
1.2
See Also:
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 Details

    • getElementType

      Object getElementType()
      Returns the type of the elements in the collection or null if untyped
      Returns:
      the type of the elements in the collection or null if untyped
    • getList

      List<E> getList(S source)
      Returns an unmodifiable List with the current contents of the source's list property
      Parameters:
      source - the property source (may be null)
      Returns:
      an unmodifiable List with the current contents of the source's list property
      Since:
      1.3
    • setList

      void setList(S source, List<E> list)
      Updates the property on the source with the specified change

      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 modify the source through an IObservableList than through the property directly.

      Parameters:
      source - the property source (may be null)
      list - the new list
      Since:
      1.3
    • updateList

      void updateList(S source, ListDiff<E> diff)
      Updates the property on the source with the specified change

      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 modify the source through an IObservableList than through the property directly.

      Parameters:
      source - the property source (may be null)
      diff - a diff describing the change
      Since:
      1.3
    • observe

      IObservableList<E> observe(S source)
      Returns an observable list observing this list property on the given property source
      Parameters:
      source - the property source
      Returns:
      an observable list observing this list property on the given property source
    • observe

      IObservableList<E> observe(Realm realm, S source)
      Returns an observable list observing this list property on the given property source
      Parameters:
      realm - the observable's realm
      source - the property source
      Returns:
      an observable list observing this list property on the given property source
    • listFactory

      Returns a factory for creating observable lists tracking this property of a particular property source.
      Returns:
      a factory for creating observable lists tracking this property of a particular property source.
    • listFactory

      IObservableFactory<S,IObservableList<E>> listFactory(Realm realm)
      Returns a factory for creating observable lists in the given realm, tracking this property of a particular property source.
      Parameters:
      realm - the realm
      Returns:
      a factory for creating observable lists in the given realm, tracking this property of a particular property source.
    • observeDetail

      <U extends S> IObservableList<E> observeDetail(IObservableValue<U> master)
      Returns an observable list on the master observable's realm which tracks this property of the current value of master.
      Parameters:
      master - the master observable
      Returns:
      an observable list on the given realm which tracks this property of the current value of master.
    • values

      <T> IListProperty<S,T> values(IValueProperty<? super E,T> detailValue)
      Returns the nested combination of this property and the specified detail value property. Note that because this property is a projection of value properties over a list, the only modification supported is through the IObservableList.set(int, Object) method. Modifications made through the returned property are delegated to the detail property, using the corresponding list element from the master property as the source.
      Parameters:
      detailValue - the detail property
      Returns:
      the nested combination of the master list and detail value properties