E
- the type of the Set
elementspublic abstract class SetExpression<E>
extends java.lang.Object
SetExpression
is an
javafx.beans.value.ObservableSetValue
plus additional convenience
methods to generate bindings in a fluent style.
A concrete sub-class of SetExpression
has to implement the method
javafx.beans.value.ObservableSetValue#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.
|
Modifier and Type | Class and Description |
---|---|
private static class |
SetExpression.EmptyObservableSet<E> |
Modifier and Type | Field and Description |
---|---|
private static ObservableSet |
EMPTY_SET |
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()
A boolean property that is
true , if the set is empty. |
int |
getSize()
The size of the set
|
<any> |
getValue() |
boolean |
isEmpty()
Gets the value of the property empty.
|
BooleanBinding |
isEqualTo(<any> other)
Creates a new
BooleanBinding that holds true if this set is equal to
another javafx.collections.ObservableSet . |
BooleanBinding |
isNotEqualTo(<any> other)
Creates a new
BooleanBinding that holds true if this set is not equal to
another javafx.collections.ObservableSet . |
BooleanBinding |
isNotNull()
|
BooleanBinding |
isNull()
|
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(<any> value)
Returns a
SetExpression that wraps a
javafx.beans.value.ObservableSetValue . |
int |
size() |
abstract ReadOnlyIntegerProperty |
sizeProperty()
An integer property that represents the size of the set.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
public abstract ReadOnlyIntegerProperty sizeProperty
getSize()
public abstract ReadOnlyBooleanProperty emptyProperty
true
, if the set is empty.isEmpty()
public <any> getValue()
public static <E> SetExpression<E> setExpression(<any> value)
SetExpression
that wraps a
javafx.beans.value.ObservableSetValue
. If the
ObservableSetValue
is already a SetExpression
, it
will be returned. Otherwise a new
SetBinding
is created that is bound to
the ObservableSetValue
.E
- the type of the Set
elementsvalue
- The source ObservableSetValue
SetExpression
that wraps the
ObservableSetValue
if necessaryjava.lang.NullPointerException
- if value
is null
public int getSize()
public abstract ReadOnlyIntegerProperty sizeProperty()
getSize()
public abstract ReadOnlyBooleanProperty emptyProperty()
true
, if the set is empty.isEmpty()
public BooleanBinding isEqualTo(<any> other)
BooleanBinding
that holds true
if this set is equal to
another javafx.collections.ObservableSet
.other
- the other ObservableSet
BooleanBinding
java.lang.NullPointerException
- if other
is null
public BooleanBinding isNotEqualTo(<any> other)
BooleanBinding
that holds true
if this set is not equal to
another javafx.collections.ObservableSet
.other
- the other ObservableSet
BooleanBinding
java.lang.NullPointerException
- if other
is null
public BooleanBinding isNull()
BooleanBinding
public BooleanBinding isNotNull()
BooleanBinding
public 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.StringBinding
public 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)
public void clear()