List elements.
ListExpression is an
javafx.beans.value.ObservableListValue plus additional convenience
methods to generate bindings in a fluent style.
A concrete sub-class of ListExpression has to implement the method
javafx., which provides the
actual value of this expression.
If the wrapped list of a ListExpression is null, all methods implementing the List
interface will behave as if they were applied to an immutable empty list.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(E
element to be appended to this list element)Implements java. Appends the specified element to the end of this list (optional operation). |
| public void | add(int
index at which the specified element is to be inserted i, E element to be inserted element)Implements java. Inserts the specified element at the specified position in this list (optional operation). |
| public boolean | addAll(Collection<? extends E>
collection containing elements to be added to this list elements)Implements java. Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). |
| public boolean | addAll(int
index at which to insert the first element from the
specified collection i, Collection<? extends E> collection containing elements to be added to this list elements)Implements java. Inserts all of the elements in the specified collection into this list at the specified position (optional operation). |
| public boolean | addAll(E...
the elements to add elements)Implements javafx. A convenience method for var-arg addition of elements. |
| public StringBinding | Returns: the newStringBindingCreates a |
| public void | clear()
Implements java. Removes all of the elements from this list (optional operation). |
| public boolean | contains(Object
element whose presence in this list is to be tested obj)Implements java. Returns |
| public boolean | containsAll(Collection<?>
collection to be checked for containment in this list objects)Implements java. Returns |
| public abstract ReadOnlyBooleanProperty | Returns: theReadOnlyBooleanPropertyA boolean property that is |
| public E | get(int
index of the element to return i)Implements java. Returns the element at the specified position in this list. |
| private ObservableList | |
| public int | |
| public ObservableList | getValue()
Implements javafx. Returns the current value of this |
| public int | indexOf(Object
element to search for obj)Implements java. Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. |
| public boolean | |
| public BooleanBinding | Returns: the newBooleanBindingthe other other)ObservableListCreates a new |
| public BooleanBinding | Returns: the newBooleanBindingthe other other)ObservableListCreates a new |
| public BooleanBinding | Returns: the newBooleanBindingCreates a new |
| public BooleanBinding | Returns: the newBooleanBindingCreates a new |
| public Iterator | iterator()
Implements java. Returns an iterator over the elements in this list in proper sequence. |
| public int | lastIndexOf(Object
element to search for obj)Implements java. Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. |
| public static < the type of the wrapped E> ListExpressionList | Returns: AListExpression that wraps the
ObservableListValue if necessaryThe source value)ObservableListValueReturns a |
| public ListIterator | listIterator()
Implements java. Returns a list iterator over the elements in this list (in proper sequence). |
| public ListIterator | listIterator(int
index of the first element to be returned from the
list iterator (by a call to i)next)Implements java. Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list. |
| public boolean | remove(Object
element to be removed from this list, if present obj)Implements java. Removes the first occurrence of the specified element from this list, if it is present (optional operation). |
| public E | remove(int
the index of the element to be removed i)Implements java. Removes the element at the specified position in this list (optional operation). |
| public void | remove(int
the start of the range to remove (inclusive) from, int the end of the range to remove (exclusive) to)Implements javafx. A simplified way of calling |
| public boolean | removeAll(Collection<?>
collection containing elements to be removed from this list objects)Implements java. Removes from this list all of its elements that are contained in the specified collection (optional operation). |
| public boolean | removeAll(E...
the elements to be removed elements)Implements javafx. A convenience method for var-arg usage of the |
| public boolean | retainAll(Collection<?>
collection containing elements to be retained in this list objects)Implements java. Retains only the elements in this list that are contained in the specified collection (optional operation). |
| public boolean | retainAll(E...
the elements to be retained elements)Implements javafx. A convenience method for var-arg usage of the |
| public E | set(int
index of the element to replace i, E element to be stored at the specified position element)Implements java. Replaces the element at the specified position in this list with the specified element (optional operation). |
| public boolean | setAll(E...
the elements to set elements)Implements javafx. Clears the ObservableList and adds all the elements passed as var-args. |
| public boolean | setAll(Collection<? extends E>
the collection with elements that will be added to this observableArrayList elements)Implements javafx. Clears the ObservableList and adds all elements from the collection. |
| public int | |
| public abstract ReadOnlyIntegerProperty | |
| public List | subList(int
low endpoint (inclusive) of the subList from, int high endpoint (exclusive) of the subList to)Implements java. Returns a view of the portion of this list between the specified
|
| public Object[] | toArray()
Implements java. Returns an array containing all of the elements in this list in proper sequence (from first to last element). |
| public <T> T[] | toArray(T[]
the array into which the elements of this list are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose. array)Implements java. Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array. |
| public ObjectBinding | Returns: theObjectBindingthe index of the element index)Creates a new |
| public ObjectBinding | Returns: theObjectBindingthe index of the element index)Creates a new |
| ListExpression | back to summary |
|---|---|
| public ListExpression() Creates a default | |
| add | back to summary |
|---|---|
| public boolean add(E element) Implements java. Doc from java. Appends the specified element to the end of this list (optional operation). Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.
| |
| add | back to summary |
|---|---|
| public void add(int i, E element) Implements java. Doc from java. Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(Collection<? extends E> elements) Implements java. Doc from java. Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(int i, Collection<? extends E> elements) Implements java. Doc from java. Inserts all of the elements in the specified collection into this list at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(E... elements) Implements javafx. Doc from javafx. A convenience method for var-arg addition of elements.
| |
| asString | back to summary |
|---|---|
| public StringBinding asString() Creates a
| |
| clear | back to summary |
|---|---|
| public void clear() Implements java. Doc from java. Removes all of the elements from this list (optional operation). The list will be empty after this call returns.
| |
| contains | back to summary |
|---|---|
| public boolean contains(Object obj) Implements java. Doc from java. Returns | |
| containsAll | back to summary |
|---|---|
| public boolean containsAll(Collection<?> objects) Implements java. Doc from java. Returns
| |
| emptyProperty | back to summary |
|---|---|
| public abstract ReadOnlyBooleanProperty emptyProperty() A boolean property that is
| |
| get | back to summary |
|---|---|
| public E get(int i) Implements java. Doc from java. Returns the element at the specified position in this list.
| |
| getNonNull | back to summary |
|---|---|
| private ObservableList | |
| getSize | back to summary |
|---|---|
| public int getSize() The size of the list
| |
| getValue | back to summary |
|---|---|
| public ObservableList Implements javafx. Doc from javafx. Returns the current value of this
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(Object obj) Implements java. Doc from java. Returns the index of the first occurrence of the specified element
in this list, or -1 if this list does not contain the element.
More formally, returns the lowest index | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements java. Doc from java. Returns
| |
| isEqualTo | back to summary |
|---|---|
| public BooleanBinding isEqualTo(final ObservableList<?> other) Creates a new
| |
| isNotEqualTo | back to summary |
|---|---|
| public BooleanBinding isNotEqualTo(final ObservableList<?> other) Creates a new
| |
| isNotNull | back to summary |
|---|---|
| public BooleanBinding isNotNull() Creates a new
| |
| isNull | back to summary |
|---|---|
| public BooleanBinding isNull() Creates a new
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over the elements in this list in proper sequence. | |
| lastIndexOf | back to summary |
|---|---|
| public int lastIndexOf(Object obj) Implements java. Doc from java. Returns the index of the last occurrence of the specified element
in this list, or -1 if this list does not contain the element.
More formally, returns the highest index | |
| listExpression | back to summary |
|---|---|
| public static <E> ListExpression Returns a
| |
| listIterator | back to summary |
|---|---|
| public ListIterator Implements java. Doc from java. Returns a list iterator over the elements in this list (in proper sequence).
| |
| listIterator | back to summary |
|---|---|
| public ListIterator Implements java. Doc from java. Returns a list iterator over the elements in this list (in proper
sequence), starting at the specified position in the list.
The specified index indicates the first element that would be
returned by an initial call to
| |
| remove | back to summary |
|---|---|
| public boolean remove(Object obj) Implements java. Doc from java. Removes the first occurrence of the specified element from this list,
if it is present (optional operation). If this list does not contain
the element, it is unchanged. More formally, removes the element with
the lowest index | |
| remove | back to summary |
|---|---|
| public E remove(int i) Implements java. Doc from java. Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
| |
| remove | back to summary |
|---|---|
| public void remove(int from, int to) Implements javafx. Doc from javafx. A simplified way of calling
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(Collection<?> objects) Implements java. Doc from java. Removes from this list all of its elements that are contained in the specified collection (optional operation).
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(E... elements) Implements javafx. Doc from javafx. A convenience method for var-arg usage of the
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(Collection<?> objects) Implements java. Doc from java. Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all of its elements that are not contained in the specified collection.
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(E... elements) Implements javafx. Doc from javafx. A convenience method for var-arg usage of the
| |
| set | back to summary |
|---|---|
| public E set(int i, E element) Implements java. Doc from java. Replaces the element at the specified position in this list with the specified element (optional operation).
| |
| setAll | back to summary |
|---|---|
| public boolean setAll(E... elements) Implements javafx. Doc from javafx. Clears the ObservableList and adds all the elements passed as var-args.
| |
| setAll | back to summary |
|---|---|
| public boolean setAll(Collection<? extends E> elements) Implements javafx. Doc from javafx. Clears the ObservableList and adds all elements from the collection.
| |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |
| sizeProperty | back to summary |
|---|---|
| public abstract ReadOnlyIntegerProperty sizeProperty() An integer property that represents the size of the list.
| |
| subList | back to summary |
|---|---|
| public List Implements java. Doc from java. Returns a view of the portion of this list between the specified
This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:
Similar idioms may be constructed for indexOf and
lastIndexOf, and all of the algorithms in the
Collections class can be applied to a subList.The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.) | |
| toArray | back to summary |
|---|---|
| public Object[] toArray() Implements java. Doc from java. Returns an array containing all of the elements in this list in proper sequence (from first to last element). The returned array will be "safe" in that no references to it are maintained by this list. (In other words, this method must allocate a new array even if this list is backed by an array). The caller is thus free to modify the returned array. This method acts as bridge between array-based and collection-based APIs. | |
| toArray | back to summary |
|---|---|
| public <T> T[] toArray(T[] array) Implements java. Doc from java. Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list. If the list fits in the specified array with room to spare (i.e.,
the array has more elements than the list), the element in the array
immediately following the end of the list is set to Like the Suppose
Note that toArray(new Object[0]) is identical in function to
toArray().
| |
| valueAt | back to summary |
|---|---|
| public ObjectBinding Creates a new
| |
| valueAt | back to summary |
|---|---|
| public ObjectBinding Creates a new
| |