E - the type of the Set elementspublic abstract class SetExpression<E> extends 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
A boolean property that is
true, if the set is empty. |
abstract ReadOnlyIntegerProperty |
size
An integer property that represents the size of the set.
|
| Constructor and Description |
|---|
SetExpression() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E element) |
boolean |
addAll(Collection<? extends E> elements) |
StringBinding |
asString()
|
void |
clear() |
boolean |
contains(Object obj) |
boolean |
containsAll(Collection<?> objects) |
abstract ReadOnlyBooleanProperty |
emptyProperty()
A boolean property that is
true, if the set is empty. |
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)
|
BooleanBinding |
isNotEqualTo(ObservableSet<?> other)
|
BooleanBinding |
isNotNull()
|
BooleanBinding |
isNull()
|
Iterator<E> |
iterator() |
boolean |
remove(Object obj) |
boolean |
removeAll(Collection<?> objects) |
boolean |
retainAll(Collection<?> objects) |
static <E> SetExpression<E> |
setExpression(ObservableSetValue<E> value)
Returns a
SetExpression that wraps a
ObservableSetValue. |
int |
size() |
abstract ReadOnlyIntegerProperty |
sizeProperty()
An integer property that represents the size of the set.
|
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetaddListener, removeListeneraddListener, removeListeneraddListener, removeListenerequals, hashCode, spliteratorparallelStream, removeIf, streampublic abstract ReadOnlyIntegerProperty sizeProperty
getSize()public abstract ReadOnlyBooleanProperty emptyProperty
true, if the set is empty.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 necessaryNullPointerException - if value is nullpublic int getSize()
public abstract ReadOnlyIntegerProperty sizeProperty()
getSize()public abstract ReadOnlyBooleanProperty emptyProperty()
true, if the set is empty.isEmpty()public BooleanBinding isEqualTo(ObservableSet<?> other)
other - the other ObservableSetBooleanBindingNullPointerException - if other is nullpublic BooleanBinding isNotEqualTo(ObservableSet<?> other)
other - the other ObservableSetBooleanBindingNullPointerException - if other is nullpublic BooleanBinding isNull()
BooleanBindingpublic BooleanBinding isNotNull()
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(Object obj)
public Object[] toArray()
public <T> T[] toArray(T[] array)
public boolean add(E element)
public boolean remove(Object obj)
public boolean containsAll(Collection<?> objects)
containsAll in interface Collection<E>containsAll in interface Set<E>public boolean addAll(Collection<? extends E> elements)
public boolean removeAll(Collection<?> objects)
public boolean retainAll(Collection<?> objects)
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.