- java.lang.Object
- 
- javafx.beans.binding.ListExpression<E>
 
- 
- Type Parameters:
- E- the type of the- Listelements.
 - All Implemented Interfaces:
- Iterable<E>,- Collection<E>,- List<E>,- Observable,- ObservableListValue<E>,- ObservableObjectValue<ObservableList<E>>,- ObservableValue<ObservableList<E>>,- ObservableList<E>
 - Direct Known Subclasses:
- ListBinding,- ReadOnlyListProperty
 
 public abstract class ListExpression<E> extends Object implements ObservableListValue<E> ListExpressionis anObservableListValueplus additional convenience methods to generate bindings in a fluent style.A concrete sub-class of ListExpressionhas to implement the methodObservableObjectValue.get(), which provides the actual value of this expression.If the wrapped list of a ListExpressionisnull, all methods implementing theListinterface will behave as if they were applied to an immutable empty list.- Since:
- JavaFX 2.1
 
- 
- 
Property SummaryProperties Type Property Description abstract ReadOnlyBooleanPropertyemptyA boolean property that istrue, if the list is empty.abstract ReadOnlyIntegerPropertysizeAn integer property that represents the size of the list.
 - 
Constructor SummaryConstructors Constructor Description ListExpression()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringBindingasString()abstract ReadOnlyBooleanPropertyemptyProperty()A boolean property that istrue, if the list is empty.intgetSize()The size of the listBooleanBindingisEqualTo(ObservableList<?> other)BooleanBindingisNotEqualTo(ObservableList<?> other)BooleanBindingisNotNull()BooleanBindingisNull()static <E> ListExpression<E>listExpression(ObservableListValue<E> value)Returns aListExpressionthat wraps aObservableListValue.abstract ReadOnlyIntegerPropertysizeProperty()An integer property that represents the size of the list.ObjectBinding<E>valueAt(int index)Creates a newObjectBindingthat contains the element at the specified position.ObjectBinding<E>valueAt(ObservableIntegerValue index)Creates a newObjectBindingthat contains the element at the specified position.- 
Methods declared in interface java.util.CollectionparallelStream, removeIf, stream
 - 
Methods declared in interface java.util.Listadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
 - 
Methods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods declared in interface javafx.beans.ObservableaddListener, removeListener
 - 
Methods declared in interface javafx.collections.ObservableListaddAll, addListener, filtered, remove, removeAll, removeListener, retainAll, setAll, setAll, sorted, sorted
 - 
Methods declared in interface javafx.beans.value.ObservableObjectValueget
 - 
Methods declared in interface javafx.beans.value.ObservableValueaddListener, getValue, removeListener
 
- 
 
- 
- 
- 
Property Detail- 
sizepublic abstract ReadOnlyIntegerProperty sizeProperty An integer property that represents the size of the list.- See Also:
- getSize()
 
 - 
emptypublic abstract ReadOnlyBooleanProperty emptyProperty A boolean property that istrue, if the list is empty.- See Also:
- List.isEmpty()
 
 
- 
 - 
Method Detail- 
listExpressionpublic static <E> ListExpression<E> listExpression(ObservableListValue<E> value) Returns aListExpressionthat wraps aObservableListValue. If theObservableListValueis already aListExpression, it will be returned. Otherwise a newListBindingis created that is bound to theObservableListValue.- Type Parameters:
- E- the type of the wrapped- List
- Parameters:
- value- The source- ObservableListValue
- Returns:
- A ListExpressionthat wraps theObservableListValueif necessary
- Throws:
- NullPointerException- if- valueis- null
 
 - 
getSizepublic int getSize() The size of the list- Returns:
- the size
 
 - 
sizePropertypublic abstract ReadOnlyIntegerProperty sizeProperty() An integer property that represents the size of the list.- See Also:
- getSize()
 
 - 
emptyPropertypublic abstract ReadOnlyBooleanProperty emptyProperty() A boolean property that istrue, if the list is empty.- See Also:
- List.isEmpty()
 
 - 
valueAtpublic ObjectBinding<E> valueAt(int index) Creates a newObjectBindingthat contains the element at the specified position. Ifindexpoints behind the list, theObjectBindingcontainsnull.- Parameters:
- index- the index of the element
- Returns:
- the ObjectBinding
- Throws:
- IllegalArgumentException- if- index < 0
 
 - 
valueAtpublic ObjectBinding<E> valueAt(ObservableIntegerValue index) Creates a newObjectBindingthat contains the element at the specified position. Ifindexpoints outside of the list, theObjectBindingcontainsnull.- Parameters:
- index- the index of the element
- Returns:
- the ObjectBinding
- Throws:
- NullPointerException- if- indexis- null
 
 - 
isEqualTopublic BooleanBinding isEqualTo(ObservableList<?> other) - Parameters:
- other- the other- ObservableList
- Returns:
- the new BooleanBinding
- Throws:
- NullPointerException- if- otheris- null
 
 - 
isNotEqualTopublic BooleanBinding isNotEqualTo(ObservableList<?> other) - Parameters:
- other- the other- ObservableList
- Returns:
- the new BooleanBinding
- Throws:
- NullPointerException- if- otheris- null
 
 - 
isNullpublic BooleanBinding isNull() - Returns:
- the new BooleanBinding
 
 - 
isNotNullpublic BooleanBinding isNotNull() - Returns:
- the new BooleanBinding
 
 - 
asStringpublic StringBinding asString() Creates aStringBindingthat holds the value of theListExpressionturned into aString. If the value of thisListExpressionchanges, the value of theStringBindingwill be updated automatically.- Returns:
- the new StringBinding
 
 
- 
 
-