Spec-Zone .ru
спецификации, руководства, описания, API
|
K
- the type of the key elementsV
- the type of the value elementspublic abstract class MapExpression<K,V> extends java.lang.Object implements ObservableMapValue<K,V>
MapExpression
is a
ObservableMapValue
plus additional convenience
methods to generate bindings in a fluent style.
A concrete sub-class of MapExpression
has to implement the method
ObservableObjectValue.get()
, which provides the
actual value of this expression.
If the wrapped list of a MapExpression
is null
, all methods implementing the Map
interface will behave as if they were applied to an immutable empty list.
Type | Property and Description |
---|---|
abstract ReadOnlyBooleanProperty |
empty
A boolean property that is
true , if the map is empty. |
abstract ReadOnlyIntegerProperty |
size |
Constructor and Description |
---|
MapExpression() |
Modifier and Type | Method and Description |
---|---|
StringBinding |
asString()
|
void |
clear() |
boolean |
containsKey(java.lang.Object obj) |
boolean |
containsValue(java.lang.Object obj) |
abstract ReadOnlyBooleanProperty |
emptyProperty()
A boolean property that is
true , if the map is empty. |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
int |
getSize()
The size of the map
|
ObservableMap<K,V> |
getValue()
Returns the current value of this
ObservableValue |
boolean |
isEmpty()
Gets the value of the property empty.
|
BooleanBinding |
isEqualTo(ObservableMap<?,?> other)
Creates a new
BooleanBinding that holds true if this map is equal to
another ObservableMap . |
BooleanBinding |
isNotEqualTo(ObservableMap<?,?> other)
Creates a new
BooleanBinding that holds true if this map is not equal to
another ObservableMap . |
BooleanBinding |
isNotNull()
Creates a new
BooleanBinding that holds true if the wrapped map is not null . |
BooleanBinding |
isNull()
Creates a new
BooleanBinding that holds true if the wrapped map is null . |
java.util.Set<K> |
keySet() |
static <K,V> MapExpression<K,V> |
mapExpression(ObservableMapValue<K,V> value)
Returns a
MapExpression that wraps a
ObservableMapValue . |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> elements) |
V |
remove(java.lang.Object obj) |
int |
size() |
abstract ReadOnlyIntegerProperty |
sizeProperty() |
ObjectBinding<V> |
valueAt(K key)
Creates a new
ObjectBinding that contains the mapping of the specified key. |
ObjectBinding<V> |
valueAt(ObservableValue<K> key)
Creates a new
ObjectBinding that contains the mapping of the specified key. |
java.util.Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
addListener, removeListener
addListener, removeListener
addListener, removeListener
public abstract ReadOnlyIntegerProperty sizeProperty
getSize()
public abstract ReadOnlyBooleanProperty emptyProperty
true
, if the map is empty.isEmpty()
public ObservableMap<K,V> getValue()
ObservableValue
ObservableValue
getValue
in interface ObservableValue<ObservableMap<K,V>>
public static <K,V> MapExpression<K,V> mapExpression(ObservableMapValue<K,V> value)
MapExpression
that wraps a
ObservableMapValue
. If the
ObservableMapValue
is already a MapExpression
, it
will be returned. Otherwise a new
MapBinding
is created that is bound to
the ObservableMapValue
.value
- The source ObservableMapValue
MapExpression
that wraps the
ObservableMapValue
if necessaryjava.lang.NullPointerException
- if value
is null
public int getSize()
public abstract ReadOnlyIntegerProperty sizeProperty()
getSize()
public abstract ReadOnlyBooleanProperty emptyProperty()
true
, if the map is empty.isEmpty()
public ObjectBinding<V> valueAt(K key)
ObjectBinding
that contains the mapping of the specified key.key
- the key of the mappingObjectBinding
public ObjectBinding<V> valueAt(ObservableValue<K> key)
ObjectBinding
that contains the mapping of the specified key.key
- the key of the mappingObjectBinding
java.lang.NullPointerException
- if key
is null
public BooleanBinding isEqualTo(ObservableMap<?,?> other)
BooleanBinding
that holds true if this map is equal to
another ObservableMap
.other
- the other ObservableMap
BooleanBinding
java.lang.NullPointerException
- if other
is null
public BooleanBinding isNotEqualTo(ObservableMap<?,?> other)
BooleanBinding
that holds true if this map is not equal to
another ObservableMap
.other
- the other ObservableMap
BooleanBinding
java.lang.NullPointerException
- if other
is null
public BooleanBinding isNull()
BooleanBinding
that holds true if the wrapped map is null
.BooleanBinding
public BooleanBinding isNotNull()
BooleanBinding
that holds true if the wrapped map is not null
.BooleanBinding
public StringBinding asString()
StringBinding
that holds the value
of the MapExpression
turned into a String
. If the
value of this MapExpression
changes, the value of the
StringBinding
will be updated automatically.StringBinding
public boolean isEmpty()
public boolean containsKey(java.lang.Object obj)
public boolean containsValue(java.lang.Object obj)
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to