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
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.collect.Multiset
Multiset.Entry<E extends Object>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
boolean
addAll
(Collection<? extends E> c) javafx.beans.binding.StringBinding
asString()
void
clear()
boolean
boolean
containsAll
(Collection<?> elements) int
abstract javafx.beans.property.ReadOnlyBooleanProperty
A boolean property that reflects whether theMultiset
is empty.entrySet()
getValue()
boolean
isEmpty()
Gets the value of the property empty.javafx.beans.binding.BooleanBinding
isEqualTo
(ObservableMultiset<?> other) Creates a newBooleanBinding
that indicates whether thisObservableMultiset
is equal to the passed inObservableMultiset
.javafx.beans.binding.BooleanBinding
isNotEqualTo
(ObservableMultiset<?> other) Creates a newBooleanBinding
that indicates whether thisObservableMultiset
is not equal to the passed inObservableMultiset
.javafx.beans.binding.BooleanBinding
javafx.beans.binding.BooleanBinding
isNull()
iterator()
static <E> MultisetExpression<E>
multisetExpression
(ObservableMultisetValue<E> multisetValue) Returns aMultisetExpression
that wraps anObservableMultisetValue
.boolean
int
boolean
removeAll
(Collection<?> c) boolean
replaceAll
(Multiset<? extends E> multiset) Replaces all the contents of theObservableMultiset
with the contents provided by the givenMultiset
.boolean
retainAll
(Collection<?> c) int
boolean
int
size()
abstract javafx.beans.property.ReadOnlyIntegerProperty
An 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, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface com.google.common.collect.Multiset
equals, forEach, forEachEntry, hashCode, spliterator, toString
Methods inherited from interface javafx.beans.Observable
addListener, removeListener
Methods inherited from interface org.eclipse.gef.common.collections.ObservableMultiset
addListener, removeListener
Methods inherited from interface javafx.beans.value.ObservableObjectValue
get
Methods 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 aMultisetExpression
that wraps anObservableMultisetValue
. If theObservableMultisetValue
is already aMultisetExpression
, it will be returned. Otherwise a new concreteMultisetBinding
is created that is bound to theObservableMultisetValue
.- Type Parameters:
E
- The element type of theMultisetExpression
.- Parameters:
multisetValue
- TheObservableMultisetValue
for which to return aMultisetExpression
.- Returns:
- The passed in
ObservableMultisetValue
if its already aMultisetExpression
, or a newly createdMultisetBinding
for it.
-
add
-
add
-
addAll
- Specified by:
addAll
in interfaceCollection<E>
-
asString
public javafx.beans.binding.StringBinding asString()Creates aStringBinding
that holds the value of theMultisetExpression
turned into aString
. If the value of thisSetMultimapExpression
changes, the value of theStringBinding
will be updated automatically.- Returns:
- A new
StringBinding
.
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
-
contains
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceMultiset<E>
-
count
-
elementSet
- Specified by:
elementSet
in interfaceMultiset<E>
-
emptyProperty
public abstract javafx.beans.property.ReadOnlyBooleanProperty emptyProperty()A boolean property that reflects whether theMultiset
is empty.- See Also:
-
entrySet
-
getValue
- Specified by:
getValue
in interfacejavafx.beans.value.ObservableValue<E>
-
isEmpty
public boolean isEmpty()Gets the value of the property empty.- Specified by:
isEmpty
in interfaceCollection<E>
- Property description:
- A boolean property that reflects whether the
Multiset
is empty.
-
isEqualTo
Creates a newBooleanBinding
that indicates whether thisObservableMultiset
is equal to the passed inObservableMultiset
.- Parameters:
other
- TheObservableMultiset
to compare thisObservableMultiset
to.- Returns:
- A new
BooleanBinding
.
-
isNotEqualTo
Creates a newBooleanBinding
that indicates whether thisObservableMultiset
is not equal to the passed inObservableMultiset
.- Parameters:
other
- TheObservableMultiset
to compare thisObservableMultiset
to.- 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:ObservableMultiset
Replaces all the contents of theObservableMultiset
with the contents provided by the givenMultiset
.- Specified by:
replaceAll
in interfaceObservableMultiset<E>
- Parameters:
multiset
- TheMultiset
whose 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:
toArray
in interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<E>
-