E - the type of the Set elementspublic abstract class SetExpression<E> extends java.lang.Object implements ObservableSetValue<E>
SetExpression is a
ObservableSetValue plus additional convenience
methods to generate bindings in a fluent style.
A concrete sub-class of SetExpression has to implement the method
ObservableObjectValue.get(), which provides the
actual value of this expression.
If the wrapped list of a SetExpression is null, all methods implementing the Set
interface will behave as if they were applied to an immutable empty set.
| Type | Property and Description |
|---|---|
abstract ReadOnlyBooleanProperty |
empty |
abstract ReadOnlyIntegerProperty |
size
A boolean property that is
true, if the set is empty. |
| Constructor and Description |
|---|
SetExpression() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E element) |
boolean |
addAll(java.util.Collection<? extends E> elements) |
StringBinding |
asString()
|
void |
clear() |
boolean |
contains(java.lang.Object obj) |
boolean |
containsAll(java.util.Collection<?> objects) |
abstract ReadOnlyBooleanProperty |
emptyProperty() |
int |
getSize()
The size of the set
|
ObservableSet<E> |
getValue()
Returns the current value of this
ObservableValue |
boolean |
isEmpty()
Gets the value of the property empty.
|
BooleanBinding |
isEqualTo(ObservableSet<?> other)
Creates a new
BooleanBinding that holds true if this set is equal to
another ObservableSet. |
BooleanBinding |
isNotEqualTo(ObservableSet<?> other)
Creates a new
BooleanBinding that holds true if this set is not equal to
another ObservableSet. |
BooleanBinding |
isNotNull()
Creates a new
BooleanBinding that holds true if the wrapped set is not null. |
BooleanBinding |
isNull()
Creates a new
BooleanBinding that holds true if the wrapped set is null. |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object obj) |
boolean |
removeAll(java.util.Collection<?> objects) |
boolean |
retainAll(java.util.Collection<?> objects) |
static <E> SetExpression<E> |
setExpression(ObservableSetValue<E> value)
Returns a
SetExpression that wraps a
ObservableSetValue. |
int |
size() |
abstract ReadOnlyIntegerProperty |
sizeProperty()
A boolean property that is
true, if the set is empty. |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetaddListener, removeListeneraddListener, removeListeneraddListener, removeListenerpublic abstract ReadOnlyIntegerProperty sizeProperty
true, if the set is empty.getSize()public abstract ReadOnlyBooleanProperty emptyProperty
isEmpty()public ObservableSet<E> getValue()
ObservableValueObservableValuegetValue in interface ObservableValue<ObservableSet<E>>public static <E> SetExpression<E> setExpression(ObservableSetValue<E> value)
SetExpression that wraps a
ObservableSetValue. If the
ObservableSetValue is already a SetExpression, it
will be returned. Otherwise a new
SetBinding is created that is bound to
the ObservableSetValue.value - The source ObservableSetValueSetExpression that wraps the
ObservableSetValue if necessaryjava.lang.NullPointerException - if value is nullpublic int getSize()
public abstract ReadOnlyIntegerProperty sizeProperty()
true, if the set is empty.getSize()public abstract ReadOnlyBooleanProperty emptyProperty()
isEmpty()public BooleanBinding isEqualTo(ObservableSet<?> other)
BooleanBinding that holds true if this set is equal to
another ObservableSet.other - the other ObservableSetBooleanBindingjava.lang.NullPointerException - if other is nullpublic BooleanBinding isNotEqualTo(ObservableSet<?> other)
BooleanBinding that holds true if this set is not equal to
another ObservableSet.other - the other ObservableSetBooleanBindingjava.lang.NullPointerException - if other is nullpublic BooleanBinding isNull()
BooleanBinding that holds true if the wrapped set is null.BooleanBindingpublic BooleanBinding isNotNull()
BooleanBinding that holds true if the wrapped set is not null.BooleanBindingpublic StringBinding asString()
StringBinding that holds the value
of the SetExpression turned into a String. If the
value of this SetExpression changes, the value of the
StringBinding will be updated automatically.StringBindingpublic int size()
public boolean isEmpty()
public boolean contains(java.lang.Object obj)
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] array)
public boolean add(E element)
public boolean remove(java.lang.Object obj)
public boolean containsAll(java.util.Collection<?> objects)
public boolean addAll(java.util.Collection<? extends E> elements)
public boolean removeAll(java.util.Collection<?> objects)
public boolean retainAll(java.util.Collection<?> objects)
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.