java.lang.Object
javafx.beans.binding.SetExpression<E>
- Type Parameters:
- E- the type of the- Setelements
- All Implemented Interfaces:
- Iterable<E>,- Collection<E>,- Set<E>,- Observable,- ObservableObjectValue<ObservableSet<E>>,- ObservableSetValue<E>,- ObservableValue<ObservableSet<E>>,- ObservableSet<E>
- Direct Known Subclasses:
- ReadOnlySetProperty,- SetBinding
SetExpression is an
 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.
- Since:
- JavaFX 2.1
- 
Property SummaryPropertiesTypePropertyDescriptionabstract ReadOnlyBooleanPropertyA boolean property that istrue, if the set is empty.abstract ReadOnlyIntegerPropertyAn integer property that represents the size of the set.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> elements) asString()voidclear()booleanbooleancontainsAll(Collection<?> objects) abstract ReadOnlyBooleanPropertyA boolean property that istrue, if the set is empty.intgetSize()The size of the setgetValue()Returns the current value of thisObservableValuebooleanisEmpty()Gets the value of theemptyproperty.isEqualTo(ObservableSet<?> other) isNotEqualTo(ObservableSet<?> other) isNull()iterator()booleanbooleanremoveAll(Collection<?> objects) booleanretainAll(Collection<?> objects) static <E> SetExpression<E> setExpression(ObservableSetValue<E> value) Returns aSetExpressionthat wraps aObservableSetValue.intsize()abstract ReadOnlyIntegerPropertyAn integer property that represents the size of the set.Object[]toArray()<T> T[]toArray(T[] array) Methods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods declared in interface javafx.beans.ObservableaddListener, removeListener, subscribeMethods declared in interface javafx.beans.value.ObservableObjectValuegetMethods declared in interface javafx.collections.ObservableSetaddListener, removeListenerMethods declared in interface javafx.beans.value.ObservableValueaddListener, flatMap, map, orElse, removeListener, subscribe, subscribe, whenMethods declared in interface java.util.Setequals, hashCode, spliterator
- 
Property Details- 
sizeAn integer property that represents the size of the set.- See Also:
 
- 
emptyA boolean property that istrue, if the set is empty.- See Also:
 
 
- 
- 
Constructor Details- 
SetExpressionpublic SetExpression()Creates a defaultSetExpression.
 
- 
- 
Method Details- 
getValueDescription copied from interface:ObservableValueReturns the current value of thisObservableValue- Specified by:
- getValuein interface- ObservableValue<E>
- Returns:
- The current value
 
- 
setExpressionReturns aSetExpressionthat wraps aObservableSetValue. If theObservableSetValueis already aSetExpression, it will be returned. Otherwise a newSetBindingis created that is bound to theObservableSetValue.- Type Parameters:
- E- the type of the- Setelements
- Parameters:
- value- The source- ObservableSetValue
- Returns:
- A SetExpressionthat wraps theObservableSetValueif necessary
- Throws:
- NullPointerException- if- valueis- null
 
- 
getSizepublic int getSize()The size of the set- Returns:
- the size
 
- 
sizePropertyAn integer property that represents the size of the set.- Returns:
- the property
- See Also:
 
- 
emptyPropertyA boolean property that istrue, if the set is empty.- Returns:
- the ReadOnlyBooleanProperty
- See Also:
 
- 
isEqualTo- Parameters:
- other- the other- ObservableSet
- Returns:
- the new BooleanBinding
- Throws:
- NullPointerException- if- otheris- null
 
- 
isNotEqualTo- Parameters:
- other- the other- ObservableSet
- Returns:
- the new BooleanBinding
- Throws:
- NullPointerException- if- otheris- null
 
- 
isNull- Returns:
- the new BooleanBinding
 
- 
isNotNull- Returns:
- the new BooleanBinding
 
- 
asStringCreates aStringBindingthat holds the value of theSetExpressionturned into aString. If the value of thisSetExpressionchanges, the value of theStringBindingwill be updated automatically.- Returns:
- the new StringBinding
 
- 
sizepublic int size()
- 
isEmptypublic boolean isEmpty()Gets the value of theemptyproperty.
- 
contains
- 
iterator
- 
toArray
- 
toArraypublic <T> T[] toArray(T[] array) 
- 
add
- 
remove
- 
containsAll- Specified by:
- containsAllin interface- Collection<E>
- Specified by:
- containsAllin interface- Set<E>
 
- 
addAll
- 
removeAll
- 
retainAll
- 
clearpublic void clear()
 
-