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>
,java.lang.Iterable<E>
,java.util.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-onlyProperty
wrapping anObservableMultiset
.This class provides identical functionality for
SetMultimap
asReadOnlyMapProperty
forMap
,ReadOnlySetProperty
forSet
, orReadOnlyListProperty
forList
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.common.collect.Multiset
Multiset.Entry<E extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyMultisetProperty()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendValueToString(java.lang.StringBuilder result)
Appends a representation of thisSetMultimapProperty
's value to the givenStringBuilder
.void
bindContent(ObservableMultiset<E> target)
Creates a unidirectional content binding between theObservableMultiset
, that is wrapped in thisReadOnlyMultisetProperty
, and the givenObservableMultiset
.void
bindContentBidirectional(ObservableMultiset<E> other)
Creates a bidirectional content binding of theObservableMultiset
, that is wrapped in thisReadOnlyMultisetProperty
, and the givenObservableMultiset
.boolean
equals(java.lang.Object other)
int
hashCode()
java.lang.String
toString()
void
unbindContent(java.lang.Object target)
Deletes a content binding between theObservableSetMultimap
, that is wrapped in thisReadOnlyMultisetProperty
, and anotherObject
.void
unbindContentBidirectional(java.lang.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, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.common.collect.Multiset
forEach, forEachEntry, spliterator
-
Methods inherited from interface org.eclipse.gef.common.collections.ObservableMultiset
addListener, removeListener
-
-
-
-
Method Detail
-
appendValueToString
protected void appendValueToString(java.lang.StringBuilder result)
Appends a representation of thisSetMultimapProperty
's value to the givenStringBuilder
. Gets called fromtoString()
to allow subclasses to provide a changed value representation.- Parameters:
result
- AStringBuilder
to append the value representation to.
-
bindContent
public void bindContent(ObservableMultiset<E> target)
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
ObservableMultiset
is the same as that of the otherObservableMultiset
. If the content of the otherObservableMultiset
changes, the wrappedObservableMultiset
will be updated automatically.- Parameters:
target
- TheObservableSetMultimap
this property should be unidirectionally bound to.
-
bindContentBidirectional
public void bindContentBidirectional(ObservableMultiset<E> other)
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
ObservableMultisets
are the same. If the content of one of theObservableMultiset
changes, the other one will be updated automatically.- Parameters:
other
- TheObservableSetMultimap
this property should be bidirectionally bound to.
-
equals
public boolean equals(java.lang.Object other)
-
hashCode
public int hashCode()
-
toString
public java.lang.String toString()
-
unbindContent
public void unbindContent(java.lang.Object target)
Deletes a content binding between theObservableSetMultimap
, that is wrapped in thisReadOnlyMultisetProperty
, and anotherObject
.- Parameters:
target
- TheObject
to which the binding should be removed.
-
unbindContentBidirectional
public void unbindContentBidirectional(java.lang.Object other)
Deletes a bidirectional content binding between theObservableSetMultimap
, that is wrapped in thisReadOnlyMultisetProperty
, and anotherObject
.- Parameters:
other
- TheObject
to which the bidirectional binding should be removed.
-
-