Class MultisetExpression<E>
java.lang.Object
org.eclipse.gef.common.beans.binding.MultisetExpression<E>
- Type Parameters:
E- The element type of theObservableMultiset.
- All Implemented Interfaces:
Multiset<E>,Iterable<E>,Collection<E>,javafx.beans.Observable,javafx.beans.value.ObservableObjectValue<ObservableMultiset<E>>,javafx.beans.value.ObservableValue<ObservableMultiset<E>>,ObservableMultisetValue<E>,ObservableMultiset<E>
- Direct Known Subclasses:
MultisetBinding,ReadOnlyMultisetProperty
A
SetMultimapExpression is a ObservableMultisetValue plus
additional convenience methods to generate bindings.
This class provides identical functionality for Multiset as
MapExpression for Map, SetExpression for Set,
or ListExpression for List.
-
Property Summary
Properties -
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 TypeMethodDescriptionbooleanintbooleanaddAll(Collection<? extends E> c) javafx.beans.binding.StringBindingasString()voidclear()booleanbooleancontainsAll(Collection<?> elements) intabstract javafx.beans.property.ReadOnlyBooleanPropertyA boolean property that reflects whether theMultisetis empty.entrySet()getValue()booleanisEmpty()Gets the value of the property empty.javafx.beans.binding.BooleanBindingisEqualTo(ObservableMultiset<?> other) Creates a newBooleanBindingthat indicates whether thisObservableMultisetis equal to the passed inObservableMultiset.javafx.beans.binding.BooleanBindingisNotEqualTo(ObservableMultiset<?> other) Creates a newBooleanBindingthat indicates whether thisObservableMultisetis not equal to the passed inObservableMultiset.javafx.beans.binding.BooleanBindingjavafx.beans.binding.BooleanBindingisNull()iterator()static <E> MultisetExpression<E>multisetExpression(ObservableMultisetValue<E> multisetValue) Returns aMultisetExpressionthat wraps anObservableMultisetValue.booleanintbooleanremoveAll(Collection<?> c) booleanreplaceAll(Multiset<? extends E> multiset) Replaces all the contents of theObservableMultisetwith the contents provided by the givenMultiset.booleanretainAll(Collection<?> c) intbooleanintsize()abstract javafx.beans.property.ReadOnlyIntegerPropertyAn integer property that represents the size of theMultiset.Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.google.common.collect.Multiset
equals, forEach, forEachEntry, hashCode, spliterator, toStringMethods 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, removeListener
-
Property Details
-
Constructor Details
-
MultisetExpression
public MultisetExpression()
-
-
Method Details
-
multisetExpression
public static <E> MultisetExpression<E> multisetExpression(ObservableMultisetValue<E> multisetValue) Returns aMultisetExpressionthat wraps anObservableMultisetValue. If theObservableMultisetValueis already aMultisetExpression, it will be returned. Otherwise a new concreteMultisetBindingis created that is bound to theObservableMultisetValue.- Type Parameters:
E- The element type of theMultisetExpression.- Parameters:
multisetValue- TheObservableMultisetValuefor which to return aMultisetExpression.- Returns:
- The passed in
ObservableMultisetValueif its already aMultisetExpression, or a newly createdMultisetBindingfor it.
-
add
-
add
-
addAll
- Specified by:
addAllin interfaceCollection<E>
-
asString
public javafx.beans.binding.StringBinding asString()Creates aStringBindingthat holds the value of theMultisetExpressionturned into aString. If the value of thisSetMultimapExpressionchanges, the value of theStringBindingwill be updated automatically.- Returns:
- A new
StringBinding.
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceMultiset<E>
-
count
-
elementSet
- Specified by:
elementSetin interfaceMultiset<E>
-
emptyProperty
public abstract javafx.beans.property.ReadOnlyBooleanProperty emptyProperty()A boolean property that reflects whether theMultisetis empty.- See Also:
-
entrySet
-
getValue
- Specified by:
getValuein interfacejavafx.beans.value.ObservableValue<E>
-
isEmpty
public boolean isEmpty()Gets the value of the property empty.- Specified by:
isEmptyin interfaceCollection<E>- Property description:
- A boolean property that reflects whether the
Multisetis empty.
-
isEqualTo
Creates a newBooleanBindingthat indicates whether thisObservableMultisetis equal to the passed inObservableMultiset.- Parameters:
other- TheObservableMultisetto compare thisObservableMultisetto.- Returns:
- A new
BooleanBinding.
-
isNotEqualTo
Creates a newBooleanBindingthat indicates whether thisObservableMultisetis not equal to the passed inObservableMultiset.- Parameters:
other- TheObservableMultisetto compare thisObservableMultisetto.- Returns:
- A new
BooleanBinding.
-
isNotNull
public javafx.beans.binding.BooleanBinding isNotNull()- Returns:
- A new
BooleanBinding.
-
isNull
public javafx.beans.binding.BooleanBinding isNull()- Returns:
- A new
BooleanBinding.
-
iterator
-
remove
-
remove
-
removeAll
-
replaceAll
Description copied from interface:ObservableMultisetReplaces all the contents of theObservableMultisetwith the contents provided by the givenMultiset.- Specified by:
replaceAllin interfaceObservableMultiset<E>- Parameters:
multiset- TheMultisetwhose values should be used to replace those of thisObservableMultiset.- Returns:
- Whether this map was changed through the replace operation.
-
retainAll
-
setCount
-
setCount
-
size
public int size() -
sizeProperty
public abstract javafx.beans.property.ReadOnlyIntegerProperty sizeProperty()An integer property that represents the size of theMultiset. -
toArray
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<E>
-