K
- The key type of the ObservableSetMultimap
.V
- The value type of the ObservableSetMultimap
.public abstract class SetMultimapExpression<K,V> extends Object implements ObservableSetMultimapValue<K,V>
SetMultimapExpression
is a ObservableSetMultimapValue
plus
additional convenience methods to generate bindings.
This class provides identical functionality for SetMultimap
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
SetMultimap is
empty. |
abstract ReadOnlyIntegerProperty |
size
An integer property that represents the size of the
SetMultimap . |
Constructor and Description |
---|
SetMultimapExpression() |
Modifier and Type | Method and Description |
---|---|
Map<K,Collection<V>> |
asMap() |
StringBinding |
asString()
|
void |
clear() |
boolean |
containsEntry(Object key,
Object value) |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
abstract ReadOnlyBooleanProperty |
emptyProperty()
A boolean property that reflects whether the
SetMultimap is
empty. |
Set<Map.Entry<K,V>> |
entries() |
Set<V> |
get(K key) |
ObservableSetMultimap<K,V> |
getValue() |
boolean |
isEmpty()
Gets the value of the property empty.
|
BooleanBinding |
isEqualTo(ObservableSetMultimap<?,?> other)
Creates a new
BooleanBinding that indicates whether this
ObservableSetMultimap is equal to the passed in
ObservableSetMultimap . |
BooleanBinding |
isNotEqualTo(ObservableSetMultimap<?,?> other)
Creates a new
BooleanBinding that indicates whether this
ObservableSetMultimap is not equal to the passed in
ObservableSetMultimap . |
BooleanBinding |
isNotNull()
|
BooleanBinding |
isNull()
|
com.google.common.collect.Multiset<K> |
keys() |
Set<K> |
keySet() |
boolean |
put(K key,
V value) |
boolean |
putAll(K key,
Iterable<? extends V> values) |
boolean |
putAll(com.google.common.collect.Multimap<? extends K,? extends V> multimap) |
boolean |
remove(Object key,
Object value) |
Set<V> |
removeAll(Object key) |
boolean |
replaceAll(com.google.common.collect.SetMultimap<? extends K,? extends V> setMultimap)
Replaces all the contents of the
ObservableSetMultimap with the
contents provided by the given SetMultimap . |
Set<V> |
replaceValues(K key,
Iterable<? extends V> values) |
static <K,V> SetMultimapExpression<K,V> |
setMultimapExpression(ObservableSetMultimapValue<K,V> setMultimapValue)
Returns a
SetMultimapExpression that wraps an
ObservableSetMultimapValue . |
int |
size() |
abstract ReadOnlyIntegerProperty |
sizeProperty()
An integer property that represents the size of the
SetMultimap . |
Collection<V> |
values() |
SetBinding<V> |
valuesAt(K key)
Creates a new
ObjectBinding that contains the values that are
mapped to the specified key. |
SetBinding<V> |
valuesAt(ObservableValue<K> key)
Creates a new
ObjectBinding that contains the values that are
mapped to the specified key. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
addListener, removeListener
addListener, removeListener
addListener, removeListener
public abstract ReadOnlyBooleanProperty emptyProperty
SetMultimap
is
empty.isEmpty()
public abstract ReadOnlyIntegerProperty sizeProperty
SetMultimap
.public static <K,V> SetMultimapExpression<K,V> setMultimapExpression(ObservableSetMultimapValue<K,V> setMultimapValue)
SetMultimapExpression
that wraps an
ObservableSetMultimapValue
. If the
ObservableSetMultimapValue
is already a
SetMultimapExpression
, it will be returned. Otherwise a new
concrete SetMultimapBinding
is created that is bound to the
ObservableSetMultimapValue
.K
- The key type of the SetMultimapExpression
.V
- The value type of the SetMultimapExpression
.setMultimapValue
- The ObservableSetMultimapValue
for which to return a
SetMultimapExpression
.ObservableSetMultimapValue
if its already a
SetMultimapExpression
, or a newly created
SetMultimapBinding
for it.public Map<K,Collection<V>> asMap()
public StringBinding asString()
StringBinding
that holds the value of the
SetMultimapExpression
turned into a String
. If the value
of this SetMultimapExpression
changes, the value of the
StringBinding
will be updated automatically.StringBinding
.public boolean containsKey(Object key)
public boolean containsValue(Object value)
public abstract ReadOnlyBooleanProperty emptyProperty()
SetMultimap
is
empty.isEmpty()
public ObservableSetMultimap<K,V> getValue()
getValue
in interface ObservableValue<ObservableSetMultimap<K,V>>
public boolean isEmpty()
public BooleanBinding isEqualTo(ObservableSetMultimap<?,?> other)
BooleanBinding
that indicates whether this
ObservableSetMultimap
is equal to the passed in
ObservableSetMultimap
.other
- The ObservableSetMultimap
to compare this
ObservableSetMultimap
to.BooleanBinding
.public BooleanBinding isNotEqualTo(ObservableSetMultimap<?,?> other)
BooleanBinding
that indicates whether this
ObservableSetMultimap
is not equal to the passed in
ObservableSetMultimap
.other
- The ObservableSetMultimap
to compare this
ObservableSetMultimap
to.BooleanBinding
.public BooleanBinding isNotNull()
BooleanBinding
.public BooleanBinding isNull()
BooleanBinding
.public com.google.common.collect.Multiset<K> keys()
public boolean replaceAll(com.google.common.collect.SetMultimap<? extends K,? extends V> setMultimap)
ObservableSetMultimap
ObservableSetMultimap
with the
contents provided by the given SetMultimap
.replaceAll
in interface ObservableSetMultimap<K,V>
setMultimap
- The SetMultimap
whose values should be used to replace
those of this ObservableSetMultimap
.public abstract ReadOnlyIntegerProperty sizeProperty()
SetMultimap
.public Collection<V> values()
public SetBinding<V> valuesAt(K key)
ObjectBinding
that contains the values that are
mapped to the specified key.key
- the key of the mappingSetBinding
.public SetBinding<V> valuesAt(ObservableValue<K> key)
ObjectBinding
that contains the values that are
mapped to the specified key.key
- The key of the mapping.ObjectBinding
.Copyright (c) 2014 itemis AG and others. All rights reserved.