Class ReadOnlyMultisetProperty<E>
java.lang.Object
org.eclipse.gef.common.beans.binding.MultisetExpression<E>
org.eclipse.gef.common.beans.property.ReadOnlyMultisetProperty<E>
- Type Parameters:
E- The element type of the wrappedObservableMultiset.
- All Implemented Interfaces:
Multiset<E>,Iterable<E>,Collection<E>,javafx.beans.Observable,javafx.beans.property.ReadOnlyProperty<ObservableMultiset<E>>,javafx.beans.value.ObservableObjectValue<ObservableMultiset<E>>,javafx.beans.value.ObservableValue<ObservableMultiset<E>>,ObservableMultisetValue<E>,ObservableMultiset<E>
- Direct Known Subclasses:
MultisetProperty,ReadOnlyMultisetPropertyBase
public abstract class ReadOnlyMultisetProperty<E>
extends MultisetExpression<E>
implements javafx.beans.property.ReadOnlyProperty<ObservableMultiset<E>>
Abstract base class defining contract for a read-only
Property
wrapping an ObservableMultiset.
This class provides identical functionality for SetMultimap as
ReadOnlyMapProperty for Map, ReadOnlySetProperty for
Set, or ReadOnlyListProperty for List.
-
Property Summary
Properties inherited from class org.eclipse.gef.common.beans.binding.MultisetExpression
empty, size -
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.collect.Multiset
Multiset.Entry<E extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendValueToString(StringBuilder result) Appends a representation of thisSetMultimapProperty's value to the givenStringBuilder.voidbindContent(ObservableMultiset<E> target) Creates a unidirectional content binding between theObservableMultiset, that is wrapped in thisReadOnlyMultisetProperty, and the givenObservableMultiset.voidCreates a bidirectional content binding of theObservableMultiset, that is wrapped in thisReadOnlyMultisetProperty, and the givenObservableMultiset.booleaninthashCode()toString()voidunbindContent(Object target) Deletes a content binding between theObservableSetMultimap, that is wrapped in thisReadOnlyMultisetProperty, and anotherObject.voidunbindContentBidirectional(Object other) Deletes a bidirectional content binding between theObservableSetMultimap, that is wrapped in thisReadOnlyMultisetProperty, and anotherObject.Methods inherited from class org.eclipse.gef.common.beans.binding.MultisetExpression
add, add, addAll, asString, clear, contains, containsAll, count, elementSet, emptyProperty, entrySet, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, iterator, multisetExpression, remove, remove, removeAll, replaceAll, retainAll, setCount, setCount, size, sizeProperty, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.google.common.collect.Multiset
forEach, forEachEntry, spliteratorMethods inherited from interface javafx.beans.Observable
addListener, removeListenerMethods inherited from interface org.eclipse.gef.common.collections.ObservableMultiset
addListener, removeListenerMethods inherited from interface javafx.beans.value.ObservableObjectValue
getMethods inherited from interface javafx.beans.value.ObservableValue
addListener, getValue, removeListenerMethods inherited from interface javafx.beans.property.ReadOnlyProperty
getBean, getName
-
Constructor Details
-
ReadOnlyMultisetProperty
public ReadOnlyMultisetProperty()
-
-
Method Details
-
appendValueToString
Appends a representation of thisSetMultimapProperty's value to the givenStringBuilder. Gets called fromtoString()to allow subclasses to provide a changed value representation.- Parameters:
result- AStringBuilderto append the value representation to.
-
bindContent
Creates a unidirectional content binding between theObservableMultiset, that is wrapped in thisReadOnlyMultisetProperty, and the givenObservableMultiset.A content binding ensures that the content of the wrapped
ObservableMultisetis the same as that of the otherObservableMultiset. If the content of the otherObservableMultisetchanges, the wrappedObservableMultisetwill be updated automatically.- Parameters:
target- TheObservableSetMultimapthis property should be unidirectionally bound to.
-
bindContentBidirectional
Creates a bidirectional content binding of theObservableMultiset, that is wrapped in thisReadOnlyMultisetProperty, and the givenObservableMultiset.A bidirectional content binding ensures that the content of the two
ObservableMultisetsare the same. If the content of one of theObservableMultisetchanges, the other one will be updated automatically.- Parameters:
other- TheObservableSetMultimapthis property should be bidirectionally bound to.
-
equals
-
hashCode
public int hashCode() -
toString
-
unbindContent
Deletes a content binding between theObservableSetMultimap, that is wrapped in thisReadOnlyMultisetProperty, and anotherObject.- Parameters:
target- TheObjectto which the binding should be removed.
-
unbindContentBidirectional
Deletes a bidirectional content binding between theObservableSetMultimap, that is wrapped in thisReadOnlyMultisetProperty, and anotherObject.- Parameters:
other- TheObjectto which the bidirectional binding should be removed.
-