Class SetMultimapPropertyBase<K,V>
java.lang.Object
org.eclipse.gef.common.beans.binding.SetMultimapExpression<K,V>
org.eclipse.gef.common.beans.property.ReadOnlySetMultimapProperty<K,V>
org.eclipse.gef.common.beans.property.SetMultimapProperty<K,V>
org.eclipse.gef.common.beans.property.SetMultimapPropertyBase<K,V>
- Type Parameters:
K
- The key type of the wrappedObservableSetMultimap
.V
- The value type of the wrappedObservableSetMultimap
.
- All Implemented Interfaces:
Multimap<K,
,V> SetMultimap<K,
,V> Observable
,Property<ObservableSetMultimap<K,
,V>> ReadOnlyProperty<ObservableSetMultimap<K,
,V>> ObservableObjectValue<ObservableSetMultimap<K,
,V>> ObservableValue<ObservableSetMultimap<K,
,V>> WritableObjectValue<ObservableSetMultimap<K,
,V>> WritableValue<ObservableSetMultimap<K,
,V>> ObservableSetMultimapValue<K,
,V> WritableSetMultimapValue<K,
,V> ObservableSetMultimap<K,
V>
- Direct Known Subclasses:
SimpleSetMultimapProperty
Abstract base class for implementing a
Property
wrapping an
ObservableSetMultimap
.
This class provides identical functionality for SetMultimap
as
MapPropertyBase
for Map
, SetPropertyBase
for
Set
, or ListPropertyBase
for List
.
-
Property Summary
TypePropertyDescriptionA boolean property that reflects whether theSetMultimap
is empty.An integer property that represents the size of theSetMultimap
. -
Constructor Summary
ConstructorDescriptionCreates a newSetMultimapPropertyBase
with no initial value.SetMultimapPropertyBase
(ObservableSetMultimap<K, V> initialValue) Creates a newSetMultimapPropertyBase
with the givenObservableSetMultimap
as initial value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(InvalidationListener listener) void
addListener
(ChangeListener<? super ObservableSetMultimap<K, V>> listener) void
addListener
(SetMultimapChangeListener<? super K, ? super V> listener) Adds aSetMultimapChangeListener
to thisObservableSetMultimap
.protected void
appendValueToString
(StringBuilder result) Appends a representation of thisSetMultimapProperty
's value to the givenStringBuilder
.void
bind
(ObservableValue<? extends ObservableSetMultimap<K, V>> observedValue) A boolean property that reflects whether theSetMultimap
is empty.protected void
Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andSetMultimapChangeListeners
.protected void
fireValueChangedEvent
(SetMultimapChangeListener.Change<? extends K, ? extends V> change) Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andSetMultimapChangeListeners
.get()
protected void
Can be overwritten by subclasses to receive invalidation notifications.boolean
isBound()
void
removeListener
(InvalidationListener listener) void
removeListener
(ChangeListener<? super ObservableSetMultimap<K, V>> listener) void
removeListener
(SetMultimapChangeListener<? super K, ? super V> listener) Removes aSetMultimapChangeListener
from thisObservableSetMultimap
.void
set
(ObservableSetMultimap<K, V> newValue) An integer property that represents the size of theSetMultimap
.void
unbind()
Methods inherited from class org.eclipse.gef.common.beans.property.SetMultimapProperty
bindBidirectional, setValue, unbindBidirectional
Methods inherited from class org.eclipse.gef.common.beans.property.ReadOnlySetMultimapProperty
bindContent, bindContentBidirectional, equals, hashCode, toString, unbindContent, unbindContentBidirectional
Methods inherited from class org.eclipse.gef.common.beans.binding.SetMultimapExpression
asMap, asString, clear, containsEntry, containsKey, containsValue, entries, get, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, keys, keySet, put, putAll, putAll, remove, removeAll, replaceAll, replaceValues, setMultimapExpression, size, values, valuesAt, valuesAt
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.common.collect.Multimap
clear, containsEntry, containsKey, containsValue, forEach, hashCode, isEmpty, keys, keySet, put, putAll, putAll, remove, size, values
Methods inherited from interface org.eclipse.gef.common.collections.ObservableSetMultimap
replaceAll
Methods inherited from interface javafx.beans.value.ObservableValue
getValue
Methods inherited from interface javafx.beans.property.ReadOnlyProperty
getBean, getName
Methods inherited from interface com.google.common.collect.SetMultimap
asMap, entries, equals, get, removeAll, replaceValues
Methods inherited from interface javafx.beans.value.WritableValue
getValue
-
Property Details
-
empty
- Specified by:
emptyProperty
in classSetMultimapExpression<K,
V> - See Also:
-
size
- Specified by:
sizeProperty
in classSetMultimapExpression<K,
V>
-
-
Constructor Details
-
SetMultimapPropertyBase
public SetMultimapPropertyBase()Creates a newSetMultimapPropertyBase
with no initial value. -
SetMultimapPropertyBase
Creates a newSetMultimapPropertyBase
with the givenObservableSetMultimap
as initial value.- Parameters:
initialValue
- The initial value of the to be createdSetMultimapPropertyBase
.
-
-
Method Details
-
addListener
-
addListener
-
addListener
Description copied from interface:ObservableSetMultimap
Adds aSetMultimapChangeListener
to thisObservableSetMultimap
. If the same listener is registered more than once, it will be notified more than once.- Parameters:
listener
- TheSetMultimapChangeListener
to add.
-
appendValueToString
Description copied from class:ReadOnlySetMultimapProperty
Appends a representation of thisSetMultimapProperty
's value to the givenStringBuilder
. Gets called fromReadOnlySetMultimapProperty.toString()
to allow subclasses to provide a changed value representation.- Overrides:
appendValueToString
in classReadOnlySetMultimapProperty<K,
V> - Parameters:
result
- AStringBuilder
to append the value representation to.
-
bind
-
emptyProperty
Description copied from class:SetMultimapExpression
A boolean property that reflects whether theSetMultimap
is empty.- Specified by:
emptyProperty
in classSetMultimapExpression<K,
V> - See Also:
-
fireValueChangedEvent
protected void fireValueChangedEvent()Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andSetMultimapChangeListeners
. -
fireValueChangedEvent
protected void fireValueChangedEvent(SetMultimapChangeListener.Change<? extends K, ? extends V> change) Fires notifications to all attachedInvalidationListeners
,ChangeListeners
, andSetMultimapChangeListeners
.- Parameters:
change
- the change that needs to be propagated
-
get
-
invalidated
protected void invalidated()Can be overwritten by subclasses to receive invalidation notifications. Does nothing by default. -
isBound
public boolean isBound() -
removeListener
-
removeListener
-
removeListener
Description copied from interface:ObservableSetMultimap
Removes aSetMultimapChangeListener
from thisObservableSetMultimap
. Will do nothing if the listener was not attached to thisObservableSetMultimap
. If it was added more than once, then only the first occurrence will be removed.- Parameters:
listener
- TheSetMultimapChangeListener
to remove.
-
set
-
sizeProperty
Description copied from class:SetMultimapExpression
An integer property that represents the size of theSetMultimap
.- Specified by:
sizeProperty
in classSetMultimapExpression<K,
V>
-
unbind
public void unbind()
-