E
- The element type of the ObservableMultiset
.public abstract class MultisetExpression<E> extends Object implements ObservableMultisetValue<E>
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
.
Type | Property and Description |
---|---|
abstract ReadOnlyBooleanProperty |
empty
A boolean property that reflects whether the
Multiset is empty. |
abstract ReadOnlyIntegerProperty |
size
An integer property that represents the size of the
Multiset . |
Constructor and Description |
---|
MultisetExpression() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E element) |
int |
add(E element,
int occurrences) |
boolean |
addAll(Collection<? extends E> c) |
StringBinding |
asString()
|
void |
clear() |
boolean |
contains(Object element) |
boolean |
containsAll(Collection<?> elements) |
int |
count(Object element) |
Set<E> |
elementSet() |
abstract ReadOnlyBooleanProperty |
emptyProperty()
A boolean property that reflects whether the
Multiset is empty. |
Set<com.google.common.collect.Multiset.Entry<E>> |
entrySet() |
ObservableMultiset<E> |
getValue() |
boolean |
isEmpty()
Gets the value of the property empty.
|
BooleanBinding |
isEqualTo(ObservableMultiset<?> other)
Creates a new
BooleanBinding that indicates whether this
ObservableMultiset is equal to the passed in
ObservableMultiset . |
BooleanBinding |
isNotEqualTo(ObservableMultiset<?> other)
Creates a new
BooleanBinding that indicates whether this
ObservableMultiset is not equal to the passed in
ObservableMultiset . |
BooleanBinding |
isNotNull()
|
BooleanBinding |
isNull()
|
Iterator<E> |
iterator() |
static <E> MultisetExpression<E> |
multisetExpression(ObservableMultisetValue<E> multisetValue)
Returns a
MultisetExpression that wraps an
ObservableMultisetValue . |
boolean |
remove(Object element) |
int |
remove(Object element,
int occurrences) |
boolean |
removeAll(Collection<?> c) |
boolean |
replaceAll(com.google.common.collect.Multiset<? extends E> multiset)
Replaces all the contents of the
ObservableMultiset with the
contents provided by the given Multiset . |
boolean |
retainAll(Collection<?> c) |
int |
setCount(E element,
int count) |
boolean |
setCount(E element,
int oldCount,
int newCount) |
int |
size() |
abstract ReadOnlyIntegerProperty |
sizeProperty()
An integer property that represents the size of the
Multiset . |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
addListener, removeListener
addListener, removeListener
addListener, removeListener
parallelStream, removeIf, spliterator, stream
public abstract ReadOnlyBooleanProperty emptyProperty
Multiset
is empty.isEmpty()
public abstract ReadOnlyIntegerProperty sizeProperty
Multiset
.public static <E> MultisetExpression<E> multisetExpression(ObservableMultisetValue<E> multisetValue)
MultisetExpression
that wraps an
ObservableMultisetValue
. If the ObservableMultisetValue
is already a MultisetExpression
, it will be returned. Otherwise a
new concrete MultisetBinding
is created that is bound to the
ObservableMultisetValue
.E
- The element type of the MultisetExpression
.multisetValue
- The ObservableMultisetValue
for which to return a
MultisetExpression
.ObservableMultisetValue
if its already a
MultisetExpression
, or a newly created
MultisetBinding
for it.public boolean add(E element)
add
in interface com.google.common.collect.Multiset<E>
add
in interface Collection<E>
public int add(E element, int occurrences)
add
in interface com.google.common.collect.Multiset<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
public StringBinding asString()
StringBinding
that holds the value of the
MultisetExpression
turned into a String
. If the value of
this SetMultimapExpression
changes, the value of the
StringBinding
will be updated automatically.StringBinding
.public void clear()
clear
in interface Collection<E>
public boolean contains(Object element)
contains
in interface com.google.common.collect.Multiset<E>
contains
in interface Collection<E>
public boolean containsAll(Collection<?> elements)
containsAll
in interface com.google.common.collect.Multiset<E>
containsAll
in interface Collection<E>
public int count(Object element)
count
in interface com.google.common.collect.Multiset<E>
public Set<E> elementSet()
elementSet
in interface com.google.common.collect.Multiset<E>
public abstract ReadOnlyBooleanProperty emptyProperty()
Multiset
is empty.isEmpty()
public Set<com.google.common.collect.Multiset.Entry<E>> entrySet()
entrySet
in interface com.google.common.collect.Multiset<E>
public ObservableMultiset<E> getValue()
getValue
in interface ObservableValue<ObservableMultiset<E>>
public boolean isEmpty()
isEmpty
in interface Collection<E>
Multiset
is empty.public BooleanBinding isEqualTo(ObservableMultiset<?> other)
BooleanBinding
that indicates whether this
ObservableMultiset
is equal to the passed in
ObservableMultiset
.other
- The ObservableMultiset
to compare this
ObservableMultiset
to.BooleanBinding
.public BooleanBinding isNotEqualTo(ObservableMultiset<?> other)
BooleanBinding
that indicates whether this
ObservableMultiset
is not equal to the passed in
ObservableMultiset
.other
- The ObservableMultiset
to compare this
ObservableMultiset
to.BooleanBinding
.public BooleanBinding isNotNull()
BooleanBinding
.public BooleanBinding isNull()
BooleanBinding
.public boolean remove(Object element)
remove
in interface com.google.common.collect.Multiset<E>
remove
in interface Collection<E>
public int remove(Object element, int occurrences)
remove
in interface com.google.common.collect.Multiset<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface com.google.common.collect.Multiset<E>
removeAll
in interface Collection<E>
public boolean replaceAll(com.google.common.collect.Multiset<? extends E> multiset)
ObservableMultiset
ObservableMultiset
with the
contents provided by the given Multiset
.replaceAll
in interface ObservableMultiset<E>
multiset
- The Multiset
whose values should be used to replace
those of this ObservableMultiset
.public boolean retainAll(Collection<?> c)
retainAll
in interface com.google.common.collect.Multiset<E>
retainAll
in interface Collection<E>
public int setCount(E element, int count)
setCount
in interface com.google.common.collect.Multiset<E>
public boolean setCount(E element, int oldCount, int newCount)
setCount
in interface com.google.common.collect.Multiset<E>
public int size()
size
in interface Collection<E>
public abstract ReadOnlyIntegerProperty sizeProperty()
Multiset
.public Object[] toArray()
toArray
in interface Collection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
Copyright (c) 2014 itemis AG and others. All rights reserved.