Class MultisetBinding<E>
java.lang.Object
org.eclipse.gef.common.beans.binding.MultisetExpression<E>
org.eclipse.gef.common.beans.binding.MultisetBinding<E>
- Type Parameters:
- E- The element type of the- ObservableMultiset.
- All Implemented Interfaces:
- Multiset<E>,- Iterable<E>,- Collection<E>,- javafx.beans.binding.Binding<ObservableMultiset<E>>,- javafx.beans.Observable,- javafx.beans.value.ObservableObjectValue<ObservableMultiset<E>>,- javafx.beans.value.ObservableValue<ObservableMultiset<E>>,- ObservableMultisetValue<E>,- ObservableMultiset<E>
public abstract class MultisetBinding<E>
extends MultisetExpression<E>
implements javafx.beans.binding.Binding<ObservableMultiset<E>>
An abstract base class that provides functionality needed to realize a
 
Binding on an ObservableMultiset.
 
 This class provides identical functionality for Multiset as
 MapBinding for Map, SetBinding for Set, or
 ListBinding for List.
- 
Property SummaryProperties
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.google.common.collect.MultisetMultiset.Entry<E extends Object>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddListener(javafx.beans.InvalidationListener listener) voidaddListener(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener) voidaddListener(MultisetChangeListener<? super E> listener) Adds aMultisetChangeListenerto thisObservableMultiset.protected voidbind(javafx.beans.Observable... dependencies) Start observing the given dependencies for changes.protected abstract ObservableMultiset<E>Computes the current value of thisMultisetBinding.voiddispose()javafx.beans.property.ReadOnlyBooleanPropertyA boolean property that reflects whether theMultisetis empty.protected voidFires notifications to all attachedInvalidationListeners,ChangeListeners, andSetMultimapChangeListeners.protected voidfireValueChangedEvent(MultisetChangeListener.Change<? extends E> change) Fires notifications to all attachedInvalidationListeners,ChangeListeners, andMultisetChangeListeners.get()javafx.collections.ObservableList<?>voidprotected voidCan be overwritten by subclasses to receive invalidation notifications.booleanisValid()voidremoveListener(javafx.beans.InvalidationListener listener) voidremoveListener(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener) voidremoveListener(MultisetChangeListener<? super E> listener) Removes aMultisetChangeListenerfrom thisObservableMultiset.javafx.beans.property.ReadOnlyIntegerPropertyAn integer property that represents the size of theMultiset.protected voidunbind(javafx.beans.Observable... dependencies) Stops observing the dependencies for changes.Methods inherited from class org.eclipse.gef.common.beans.binding.MultisetExpressionadd, add, addAll, asString, clear, contains, containsAll, count, elementSet, entrySet, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, iterator, multisetExpression, remove, remove, removeAll, replaceAll, retainAll, setCount, setCount, size, toArray, toArrayMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods inherited from interface com.google.common.collect.Multisetequals, forEach, forEachEntry, hashCode, spliterator, toStringMethods inherited from interface javafx.beans.value.ObservableValuegetValue
- 
Property Details- 
emptypublic javafx.beans.property.ReadOnlyBooleanProperty emptyProperty- Specified by:
- emptyPropertyin class- MultisetExpression<E>
- Returns:
- A read-only property.
 
- 
sizepublic javafx.beans.property.ReadOnlyIntegerProperty sizeProperty- Specified by:
- sizePropertyin class- MultisetExpression<E>
- Returns:
- A read-only property.
 
 
- 
- 
Constructor Details- 
MultisetBindingpublic MultisetBinding()
 
- 
- 
Method Details- 
addListener- Specified by:
- addListenerin interface- javafx.beans.value.ObservableValue<E>
 
- 
addListenerpublic void addListener(javafx.beans.InvalidationListener listener) - Specified by:
- addListenerin interface- javafx.beans.Observable
 
- 
addListenerDescription copied from interface:ObservableMultisetAdds aMultisetChangeListenerto thisObservableMultiset. If the same listener is registered more than once, it will be notified more than once.- Specified by:
- addListenerin interface- ObservableMultiset<E>
- Parameters:
- listener- The- MultisetChangeListenerto add.
 
- 
bindprotected void bind(javafx.beans.Observable... dependencies) Start observing the given dependencies for changes. If the value of one of the dependencies changes, the binding is marked as invalid.- Parameters:
- dependencies- The dependencies to observe.
 
- 
computeValueComputes the current value of thisMultisetBinding.- Returns:
- The current value of this MultisetBinding.
 
- 
disposepublic void dispose()- Specified by:
- disposein interface- javafx.beans.binding.Binding<E>
 
- 
emptyPropertypublic javafx.beans.property.ReadOnlyBooleanProperty emptyProperty()Description copied from class:MultisetExpressionA boolean property that reflects whether theMultisetis empty.- Specified by:
- emptyPropertyin class- MultisetExpression<E>
- Returns:
- A read-only property.
 
- 
fireValueChangedEventprotected void fireValueChangedEvent()Fires notifications to all attachedInvalidationListeners,ChangeListeners, andSetMultimapChangeListeners.
- 
fireValueChangedEventFires notifications to all attachedInvalidationListeners,ChangeListeners, andMultisetChangeListeners.- Parameters:
- change- the change that needs to be propagated
 
- 
get- Specified by:
- getin interface- javafx.beans.value.ObservableObjectValue<E>
 
- 
getDependenciespublic javafx.collections.ObservableList<?> getDependencies()- Specified by:
- getDependenciesin interface- javafx.beans.binding.Binding<E>
 
- 
invalidatepublic void invalidate()- Specified by:
- invalidatein interface- javafx.beans.binding.Binding<E>
 
- 
invalidatedprotected void invalidated()Can be overwritten by subclasses to receive invalidation notifications. Does nothing by default.
- 
isValidpublic boolean isValid()- Specified by:
- isValidin interface- javafx.beans.binding.Binding<E>
 
- 
removeListenerpublic void removeListener(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener) - Specified by:
- removeListenerin interface- javafx.beans.value.ObservableValue<E>
 
- 
removeListenerpublic void removeListener(javafx.beans.InvalidationListener listener) - Specified by:
- removeListenerin interface- javafx.beans.Observable
 
- 
removeListenerDescription copied from interface:ObservableMultisetRemoves aMultisetChangeListenerfrom thisObservableMultiset. Will do nothing if the listener was not attached to thisObservableMultiset. If it was added more than once, then only the first occurrence will be removed.- Specified by:
- removeListenerin interface- ObservableMultiset<E>
- Parameters:
- listener- The- MultisetChangeListenerto remove.
 
- 
sizePropertypublic javafx.beans.property.ReadOnlyIntegerProperty sizeProperty()Description copied from class:MultisetExpressionAn integer property that represents the size of theMultiset.- Specified by:
- sizePropertyin class- MultisetExpression<E>
- Returns:
- A read-only property.
 
- 
unbindprotected void unbind(javafx.beans.Observable... dependencies) Stops observing the dependencies for changes. The binding will no longer be marked as invalid if one of the dependencies changes.- Parameters:
- dependencies- The dependencies to stop observing.
 
 
-