Class ReadOnlySetProperty<E>
java.lang.Object
javafx.beans.binding.SetExpression<E>
javafx.beans.property.ReadOnlySetProperty<E>
- Type Parameters:
E- the type of theSetelements
- All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>, Observable, ReadOnlyProperty<ObservableSet<E>>, ObservableObjectValue<ObservableSet<E>>, ObservableSetValue<E>, ObservableValue<ObservableSet<E>>, ObservableSet<E>
- Direct Known Subclasses:
ReadOnlySetPropertyBase, SetProperty
public abstract class ReadOnlySetProperty<E>
extends SetExpression<E>
implements ReadOnlyProperty<ObservableSet<E>>
Superclass for all readonly properties wrapping an
ObservableSet.- Since:
- JavaFX 2.1
- See Also:
-
Property Summary
Properties declared in class SetExpression
empty, sizeTypePropertyDescriptionabstract ReadOnlyBooleanPropertyA boolean property that istrue, if the set is empty.abstract ReadOnlyIntegerPropertyAn integer property that represents the size of the set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindContent(ObservableSet<E> set) Creates a content binding between theObservableSet, that is wrapped in thisReadOnlySetProperty, and anotherObservableSet.voidCreates a bidirectional content binding of theObservableSet, that is wrapped in thisReadOnlySetProperty, and anotherObservableSet.booleaninthashCode()Returns a hash code for thisReadOnlySetPropertyobject.toString()Returns a string representation of thisReadOnlySetPropertyobject.voidunbindContent(Object object) Deletes a content binding between theObservableSet, that is wrapped in thisReadOnlySetProperty, and anotherObject.voidunbindContentBidirectional(Object object) Deletes a bidirectional content binding between theObservableSet, that is wrapped in thisReadOnlySetProperty, and anotherObject.Methods declared in class SetExpression
add, addAll, asString, clear, contains, containsAll, emptyProperty, getSize, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, iterator, remove, removeAll, retainAll, setExpression, size, sizeProperty, toArray, toArrayModifier 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 Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods declared in interface Collection
parallelStream, removeIf, stream, toArrayMethods declared in interface Observable
addListener, removeListener, subscribeModifier and TypeMethodDescriptionvoidaddListener(InvalidationListener listener) Adds anInvalidationListenerwhich will be notified whenever theObservablebecomes invalid.voidremoveListener(InvalidationListener listener) Removes the given listener from the list of listeners, that are notified whenever the value of theObservablebecomes invalid.default SubscriptionCreates aSubscriptionon thisObservablewhich callsinvalidationSubscriberwhenever it becomes invalid.Methods declared in interface ObservableObjectValue
getModifier and TypeMethodDescriptionget()Returns the current value of thisObservableObjectValue<T>.Methods declared in interface ObservableSet
addListener, removeListenerModifier and TypeMethodDescriptionvoidaddListener(SetChangeListener<? super E> listener) Add a listener to this observable set.voidremoveListener(SetChangeListener<? super E> listener) Tries to removed a listener from this observable set.Methods declared in interface ObservableValue
addListener, flatMap, map, orElse, removeListener, subscribe, subscribe, whenModifier and TypeMethodDescriptionvoidaddListener(ChangeListener<? super ObservableSet<E>> listener) Adds aChangeListenerwhich will be notified whenever the value of theObservableValuechanges.default <U> ObservableValue<U> flatMap(Function<? super ObservableSet<E>, ? extends ObservableValue<? extends U>> mapper) Returns anObservableValuethat holds the value of anObservableValueproduced by applying the given mapping function on this value.default <U> ObservableValue<U> map(Function<? super ObservableSet<E>, ? extends U> mapper) Returns anObservableValuethat holds the result of applying the given mapping function on this value.default ObservableValue<ObservableSet<E>> orElse(ObservableSet<E> constant) Returns anObservableValuethat holds this value, or the given constant if it isnull.voidremoveListener(ChangeListener<? super ObservableSet<E>> listener) Removes the given listener from the list of listeners that are notified whenever the value of theObservableValuechanges.default Subscriptionsubscribe(BiConsumer<? super ObservableSet<E>, ? super ObservableSet<E>> changeSubscriber) Creates aSubscriptionon thisObservableValuewhich calls the givenchangeSubscriberwith the old and new value whenever its value changes.default Subscriptionsubscribe(Consumer<? super ObservableSet<E>> valueSubscriber) Creates aSubscriptionon thisObservableValuewhich immediately provides the current value to the givenvalueSubscriber, followed by any subsequent values whenever its value changes.default ObservableValue<ObservableSet<E>> when(ObservableValue<Boolean> condition) Returns anObservableValuethat holds this value and is updated only whenconditionholdstrue.Methods declared in interface ReadOnlyProperty
getBean, getNameMethods declared in interface Set
spliterator
-
Constructor Details
-
ReadOnlySetProperty
public ReadOnlySetProperty()The constructor ofReadOnlySetProperty.
-
-
Method Details
-
bindContentBidirectional
Creates a bidirectional content binding of theObservableSet, that is wrapped in thisReadOnlySetProperty, and anotherObservableSet.A bidirectional content binding ensures that the content of two
ObservableSetsis the same. If the content of one of the sets changes, the other one will be updated automatically.- Parameters:
set- theObservableSetthis property should be bound to- Throws:
NullPointerException- ifsetisnullIllegalArgumentException- ifsetis the same set that thisReadOnlySetPropertypoints to
-
unbindContentBidirectional
Deletes a bidirectional content binding between theObservableSet, that is wrapped in thisReadOnlySetProperty, and anotherObject.- Parameters:
object- theObjectto which the bidirectional binding should be removed- Throws:
NullPointerException- ifobjectisnullIllegalArgumentException- ifobjectis the same set that thisReadOnlySetPropertypoints to
-
bindContent
Creates a content binding between theObservableSet, that is wrapped in thisReadOnlySetProperty, and anotherObservableSet.A content binding ensures that the content of the wrapped
ObservableSetsis the same as that of the other set. If the content of the other set changes, the wrapped set will be updated automatically. Once the wrapped set is bound to another set, you must not change it directly.- Parameters:
set- theObservableSetthis property should be bound to- Throws:
NullPointerException- ifsetisnullIllegalArgumentException- ifsetis the same set that thisReadOnlySetPropertypoints to
-
unbindContent
Deletes a content binding between theObservableSet, that is wrapped in thisReadOnlySetProperty, and anotherObject.- Parameters:
object- theObjectto which the binding should be removed- Throws:
NullPointerException- ifobjectisnullIllegalArgumentException- ifobjectis the same set that thisReadOnlySetPropertypoints to
-
equals
-
hashCode
-
toString
-