Class SetMultimapExpression<K,V>
java.lang.Object
org.eclipse.gef.common.beans.binding.SetMultimapExpression<K,V>
- Type Parameters:
K
- The key type of theObservableSetMultimap
.V
- The value type of theObservableSetMultimap
.
- All Implemented Interfaces:
Multimap<K,
,V> SetMultimap<K,
,V> Observable
,ObservableObjectValue<ObservableSetMultimap<K,
,V>> ObservableValue<ObservableSetMultimap<K,
,V>> ObservableSetMultimapValue<K,
,V> ObservableSetMultimap<K,
V>
- Direct Known Subclasses:
ReadOnlySetMultimapProperty
,SetMultimapBinding
public abstract class SetMultimapExpression<K,V>
extends Object
implements ObservableSetMultimapValue<K,V>
A
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
.
-
Property Summary
TypePropertyDescriptionabstract ReadOnlyBooleanProperty
A boolean property that reflects whether theSetMultimap
is empty.abstract ReadOnlyIntegerProperty
An integer property that represents the size of theSetMultimap
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMap<K,
Collection<V>> asMap()
asString()
void
clear()
boolean
containsEntry
(Object key, Object value) boolean
containsKey
(Object key) boolean
containsValue
(Object value) abstract ReadOnlyBooleanProperty
A boolean property that reflects whether theSetMultimap
is empty.entries()
getValue()
boolean
isEmpty()
Gets the value of the property empty.isEqualTo
(ObservableSetMultimap<?, ?> other) Creates a newBooleanBinding
that indicates whether thisObservableSetMultimap
is equal to the passed inObservableSetMultimap
.isNotEqualTo
(ObservableSetMultimap<?, ?> other) Creates a newBooleanBinding
that indicates whether thisObservableSetMultimap
is not equal to the passed inObservableSetMultimap
.isNull()
keys()
keySet()
boolean
boolean
boolean
boolean
boolean
replaceAll
(SetMultimap<? extends K, ? extends V> setMultimap) Replaces all the contents of theObservableSetMultimap
with the contents provided by the givenSetMultimap
.replaceValues
(K key, Iterable<? extends V> values) static <K,
V> SetMultimapExpression<K, V> setMultimapExpression
(ObservableSetMultimapValue<K, V> setMultimapValue) Returns aSetMultimapExpression
that wraps anObservableSetMultimapValue
.int
size()
abstract ReadOnlyIntegerProperty
An integer property that represents the size of theSetMultimap
.values()
valuesAt
(ObservableValue<K> key) Creates a newObjectBinding
that contains the values that are mapped to the specified key.Creates a newObjectBinding
that contains the values that are mapped to the specified key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javafx.beans.Observable
addListener, removeListener
Methods inherited from interface javafx.beans.value.ObservableObjectValue
get
Methods inherited from interface org.eclipse.gef.common.collections.ObservableSetMultimap
addListener, removeListener
Methods inherited from interface javafx.beans.value.ObservableValue
addListener, removeListener
Methods inherited from interface com.google.common.collect.SetMultimap
equals
-
Property Details
-
empty
A boolean property that reflects whether theSetMultimap
is empty.- See Also:
-
size
An integer property that represents the size of theSetMultimap
.
-
-
Constructor Details
-
SetMultimapExpression
public SetMultimapExpression()
-
-
Method Details
-
setMultimapExpression
public static <K,V> SetMultimapExpression<K,V> setMultimapExpression(ObservableSetMultimapValue<K, V> setMultimapValue) Returns aSetMultimapExpression
that wraps anObservableSetMultimapValue
. If theObservableSetMultimapValue
is already aSetMultimapExpression
, it will be returned. Otherwise a new concreteSetMultimapBinding
is created that is bound to theObservableSetMultimapValue
.- Type Parameters:
K
- The key type of theSetMultimapExpression
.V
- The value type of theSetMultimapExpression
.- Parameters:
setMultimapValue
- TheObservableSetMultimapValue
for which to return aSetMultimapExpression
.- Returns:
- The passed in
ObservableSetMultimapValue
if its already aSetMultimapExpression
, or a newly createdSetMultimapBinding
for it.
-
asMap
-
asString
Creates aStringBinding
that holds the value of theSetMultimapExpression
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() -
containsEntry
- Specified by:
containsEntry
in interfaceMultimap<K,
V>
-
containsKey
- Specified by:
containsKey
in interfaceMultimap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMultimap<K,
V>
-
emptyProperty
A boolean property that reflects whether theSetMultimap
is empty.- See Also:
-
entries
-
get
-
getValue
- Specified by:
getValue
in interfaceObservableValue<K>
-
isEmpty
public boolean isEmpty()Gets the value of the property empty.- Specified by:
isEmpty
in interfaceMultimap<K,
V> - Property description:
- A boolean property that reflects whether the
SetMultimap
is empty.
-
isEqualTo
Creates a newBooleanBinding
that indicates whether thisObservableSetMultimap
is equal to the passed inObservableSetMultimap
.- Parameters:
other
- TheObservableSetMultimap
to compare thisObservableSetMultimap
to.- Returns:
- A new
BooleanBinding
.
-
isNotEqualTo
Creates a newBooleanBinding
that indicates whether thisObservableSetMultimap
is not equal to the passed inObservableSetMultimap
.- Parameters:
other
- TheObservableSetMultimap
to compare thisObservableSetMultimap
to.- Returns:
- A new
BooleanBinding
.
-
isNotNull
- Returns:
- A new
BooleanBinding
.
-
isNull
- Returns:
- A new
BooleanBinding
.
-
keys
-
keySet
-
put
-
putAll
-
putAll
-
remove
-
removeAll
-
replaceAll
Description copied from interface:ObservableSetMultimap
Replaces all the contents of theObservableSetMultimap
with the contents provided by the givenSetMultimap
.- Specified by:
replaceAll
in interfaceObservableSetMultimap<K,
V> - Parameters:
setMultimap
- TheSetMultimap
whose values should be used to replace those of thisObservableSetMultimap
.- Returns:
- Whether this map was changed through the replace operation.
-
replaceValues
- Specified by:
replaceValues
in interfaceMultimap<K,
V> - Specified by:
replaceValues
in interfaceSetMultimap<K,
V>
-
size
public int size() -
sizeProperty
An integer property that represents the size of theSetMultimap
. -
values
-
valuesAt
Creates a newObjectBinding
that contains the values that are mapped to the specified key.- Parameters:
key
- the key of the mapping- Returns:
- A new
SetBinding
.
-
valuesAt
Creates a newObjectBinding
that contains the values that are mapped to the specified key.- Parameters:
key
- The key of the mapping.- Returns:
- The
ObjectBinding
.
-