E
- The element type of the wrapped ObservableMultiset
.public abstract class MultisetPropertyBase<E> extends MultisetProperty<E>
Property
wrapping an
ObservableMultiset
.
This class provides identical functionality for Multiset
as
MapPropertyBase
for Map
, SetPropertyBase
for
Set
, or ListPropertyBase
for List
.
Type | Property and Description |
---|---|
javafx.beans.property.ReadOnlyBooleanProperty |
empty
A boolean property that reflects whether the
Multiset is empty. |
javafx.beans.property.ReadOnlyIntegerProperty |
size
An integer property that represents the size of the
Multiset . |
Constructor and Description |
---|
MultisetPropertyBase()
Creates a new
MultisetPropertyBase with no initial value. |
MultisetPropertyBase(ObservableMultiset<E> initialValue)
Creates a new
MultisetPropertyBase with the given
ObservableMultiset as initial value. |
Modifier and Type | Method and Description |
---|---|
void |
addListener(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener) |
void |
addListener(javafx.beans.InvalidationListener listener) |
void |
addListener(MultisetChangeListener<? super E> listener)
Adds a
MultisetChangeListener to this ObservableMultiset . |
protected void |
appendValueToString(java.lang.StringBuilder result)
Appends a representation of this
SetMultimapProperty 's value to
the given StringBuilder . |
void |
bind(javafx.beans.value.ObservableValue<? extends ObservableMultiset<E>> observedValue) |
javafx.beans.property.ReadOnlyBooleanProperty |
emptyProperty()
A boolean property that reflects whether the
Multiset is empty. |
protected void |
fireValueChangedEvent()
Fires notifications to all attached
InvalidationListeners ,
ChangeListeners , and
MultisetChangeListeners . |
protected void |
fireValueChangedEvent(MultisetChangeListener.Change<? extends E> change)
Fires notifications to all attached
InvalidationListeners ,
ChangeListeners , and
MultisetChangeListeners . |
ObservableMultiset<E> |
get() |
protected void |
invalidated()
Can be overwritten by subclasses to receive invalidation notifications.
|
boolean |
isBound() |
void |
removeListener(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener) |
void |
removeListener(javafx.beans.InvalidationListener listener) |
void |
removeListener(MultisetChangeListener<? super E> listener)
Removes a
MultisetChangeListener from this
ObservableMultiset . |
void |
set(ObservableMultiset<E> newValue) |
javafx.beans.property.ReadOnlyIntegerProperty |
sizeProperty()
An integer property that represents the size of the
Multiset . |
void |
unbind() |
bindBidirectional, setValue, unbindBidirectional
bindContent, bindContentBidirectional, equals, hashCode, toString, unbindContent, unbindContentBidirectional
add, 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, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll
add, add, contains, containsAll, count, elementSet, entrySet, equals, hashCode, iterator, remove, remove, removeAll, retainAll, setCount, setCount, toString
public javafx.beans.property.ReadOnlyBooleanProperty emptyProperty
emptyProperty
in class MultisetExpression<E>
MultisetExpression.isEmpty()
public javafx.beans.property.ReadOnlyIntegerProperty sizeProperty
sizeProperty
in class MultisetExpression<E>
public MultisetPropertyBase()
MultisetPropertyBase
with no initial value.public MultisetPropertyBase(ObservableMultiset<E> initialValue)
MultisetPropertyBase
with the given
ObservableMultiset
as initial value.initialValue
- The initial value of the to be created
MultisetPropertyBase
.public void addListener(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener)
public void addListener(javafx.beans.InvalidationListener listener)
public void addListener(MultisetChangeListener<? super E> listener)
ObservableMultiset
MultisetChangeListener
to this ObservableMultiset
.
If the same listener is registered more than once, it will be notified
more than once.listener
- The MultisetChangeListener
to add.protected void appendValueToString(java.lang.StringBuilder result)
ReadOnlyMultisetProperty
SetMultimapProperty
's value to
the given StringBuilder
. Gets called from ReadOnlyMultisetProperty.toString()
to
allow subclasses to provide a changed value representation.appendValueToString
in class ReadOnlyMultisetProperty<E>
result
- A StringBuilder
to append the value representation to.public void bind(javafx.beans.value.ObservableValue<? extends ObservableMultiset<E>> observedValue)
public javafx.beans.property.ReadOnlyBooleanProperty emptyProperty()
MultisetExpression
Multiset
is empty.emptyProperty
in class MultisetExpression<E>
MultisetExpression.isEmpty()
protected void fireValueChangedEvent()
InvalidationListeners
,
ChangeListeners
, and
MultisetChangeListeners
.protected void fireValueChangedEvent(MultisetChangeListener.Change<? extends E> change)
InvalidationListeners
,
ChangeListeners
, and
MultisetChangeListeners
.change
- the change that needs to be propagatedpublic ObservableMultiset<E> get()
protected void invalidated()
public boolean isBound()
public void removeListener(javafx.beans.value.ChangeListener<? super ObservableMultiset<E>> listener)
public void removeListener(javafx.beans.InvalidationListener listener)
public void removeListener(MultisetChangeListener<? super E> listener)
ObservableMultiset
MultisetChangeListener
from this
ObservableMultiset
. Will do nothing if the listener was not
attached to this ObservableMultiset
. If it was added more than
once, then only the first occurrence will be removed.listener
- The MultisetChangeListener
to remove.public void set(ObservableMultiset<E> newValue)
public javafx.beans.property.ReadOnlyIntegerProperty sizeProperty()
MultisetExpression
Multiset
.sizeProperty
in class MultisetExpression<E>
public void unbind()
Copyright (c) 2014 itemis AG and others. All rights reserved.