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, wait
get
addListener, removeListener
addListener, removeListener
addListener, removeListener
equals, hashCode, spliterator
parallelStream, removeIf, stream
public abstract ReadOnlyIntegerProperty sizeProperty
getSize()
public abstract ReadOnlyBooleanProperty emptyProperty
true
, if the set is empty.isEmpty()
public ObservableSet<E> getValue()
ObservableValue
ObservableValue
getValue
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 ObservableSetValue
SetExpression
that wraps the
ObservableSetValue
if necessaryNullPointerException
- 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(ObservableSet<?> other)
other
- the other ObservableSet
BooleanBinding
NullPointerException
- if other
is null
public BooleanBinding isNotEqualTo(ObservableSet<?> other)
other
- the other ObservableSet
BooleanBinding
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(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)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.