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> javafx.beans.Observable,javafx.beans.value.ObservableObjectValue<ObservableSetMultimap<K,,V>> javafx.beans.value.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
PropertiesTypePropertyDescriptionabstract javafx.beans.property.ReadOnlyBooleanPropertyA boolean property that reflects whether theSetMultimapis empty.abstract javafx.beans.property.ReadOnlyIntegerPropertyAn integer property that represents the size of theSetMultimap. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap<K,Collection<V>> asMap()javafx.beans.binding.StringBindingasString()voidclear()booleancontainsEntry(Object key, Object value) booleancontainsKey(Object key) booleancontainsValue(Object value) abstract javafx.beans.property.ReadOnlyBooleanPropertyA boolean property that reflects whether theSetMultimapis empty.entries()getValue()booleanisEmpty()Gets the value of the property empty.javafx.beans.binding.BooleanBindingisEqualTo(ObservableSetMultimap<?, ?> other) Creates a newBooleanBindingthat indicates whether thisObservableSetMultimapis equal to the passed inObservableSetMultimap.javafx.beans.binding.BooleanBindingisNotEqualTo(ObservableSetMultimap<?, ?> other) Creates a newBooleanBindingthat indicates whether thisObservableSetMultimapis not equal to the passed inObservableSetMultimap.javafx.beans.binding.BooleanBindingjavafx.beans.binding.BooleanBindingisNull()keys()keySet()booleanbooleanbooleanbooleanbooleanreplaceAll(SetMultimap<? extends K, ? extends V> setMultimap) Replaces all the contents of theObservableSetMultimapwith 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 aSetMultimapExpressionthat wraps anObservableSetMultimapValue.intsize()abstract javafx.beans.property.ReadOnlyIntegerPropertyAn integer property that represents the size of theSetMultimap.values()javafx.beans.binding.SetBinding<V>Creates a newObjectBindingthat contains the values that are mapped to the specified key.javafx.beans.binding.SetBinding<V>Creates a newObjectBindingthat 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, waitMethods inherited from interface javafx.beans.Observable
addListener, removeListenerMethods inherited from interface javafx.beans.value.ObservableObjectValue
getMethods inherited from interface org.eclipse.gef.common.collections.ObservableSetMultimap
addListener, removeListenerMethods inherited from interface javafx.beans.value.ObservableValue
addListener, removeListenerMethods inherited from interface com.google.common.collect.SetMultimap
equals
-
Property Details
-
empty
public abstract javafx.beans.property.ReadOnlyBooleanProperty emptyPropertyA boolean property that reflects whether theSetMultimapis empty.- See Also:
-
size
public abstract javafx.beans.property.ReadOnlyIntegerProperty sizePropertyAn 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 aSetMultimapExpressionthat wraps anObservableSetMultimapValue. If theObservableSetMultimapValueis already aSetMultimapExpression, it will be returned. Otherwise a new concreteSetMultimapBindingis created that is bound to theObservableSetMultimapValue.- Type Parameters:
K- The key type of theSetMultimapExpression.V- The value type of theSetMultimapExpression.- Parameters:
setMultimapValue- TheObservableSetMultimapValuefor which to return aSetMultimapExpression.- Returns:
- The passed in
ObservableSetMultimapValueif its already aSetMultimapExpression, or a newly createdSetMultimapBindingfor it.
-
asMap
-
asString
public javafx.beans.binding.StringBinding asString()Creates aStringBindingthat holds the value of theSetMultimapExpressionturned into aString. If the value of thisSetMultimapExpressionchanges, the value of theStringBindingwill be updated automatically.- Returns:
- A new
StringBinding.
-
clear
public void clear() -
containsEntry
- Specified by:
containsEntryin interfaceMultimap<K,V>
-
containsKey
- Specified by:
containsKeyin interfaceMultimap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMultimap<K,V>
-
emptyProperty
public abstract javafx.beans.property.ReadOnlyBooleanProperty emptyProperty()A boolean property that reflects whether theSetMultimapis empty.- See Also:
-
entries
-
get
-
getValue
- Specified by:
getValuein interfacejavafx.beans.value.ObservableValue<K>
-
isEmpty
public boolean isEmpty()Gets the value of the property empty.- Specified by:
isEmptyin interfaceMultimap<K,V> - Property description:
- A boolean property that reflects whether the
SetMultimapis empty.
-
isEqualTo
Creates a newBooleanBindingthat indicates whether thisObservableSetMultimapis equal to the passed inObservableSetMultimap.- Parameters:
other- TheObservableSetMultimapto compare thisObservableSetMultimapto.- Returns:
- A new
BooleanBinding.
-
isNotEqualTo
Creates a newBooleanBindingthat indicates whether thisObservableSetMultimapis not equal to the passed inObservableSetMultimap.- Parameters:
other- TheObservableSetMultimapto compare thisObservableSetMultimapto.- 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.
-
keys
-
keySet
-
put
-
putAll
-
putAll
-
remove
-
removeAll
-
replaceAll
Description copied from interface:ObservableSetMultimapReplaces all the contents of theObservableSetMultimapwith the contents provided by the givenSetMultimap.- Specified by:
replaceAllin interfaceObservableSetMultimap<K,V> - Parameters:
setMultimap- TheSetMultimapwhose values should be used to replace those of thisObservableSetMultimap.- Returns:
- Whether this map was changed through the replace operation.
-
replaceValues
- Specified by:
replaceValuesin interfaceMultimap<K,V> - Specified by:
replaceValuesin interfaceSetMultimap<K,V>
-
size
public int size() -
sizeProperty
public abstract javafx.beans.property.ReadOnlyIntegerProperty sizeProperty()An integer property that represents the size of theSetMultimap. -
values
-
valuesAt
Creates a newObjectBindingthat contains the values that are mapped to the specified key.- Parameters:
key- the key of the mapping- Returns:
- A new
SetBinding.
-
valuesAt
Creates a newObjectBindingthat contains the values that are mapped to the specified key.- Parameters:
key- The key of the mapping.- Returns:
- The
ObjectBinding.
-