K
- キー要素の型V
- 値要素の型public abstract class MapExpression<K,V> extends Object implements ObservableMapValue<K,V>
MapExpression
は、ObservableMapValue
と優れたスタイルでバインディングを生成する便利な追加のメソッドです。
MapExpression
の具体的なサブクラスは、この式の実際の値を提供するメソッドObservableObjectValue.get()
を実装する必要があります。
MapExpression
のラップされたリストがnull
である場合、Map
インタフェースを実装するすべてのメソッドが不変の空のリストに適用されるかのように動作します。
Type | プロパティと説明 |
---|---|
abstract ReadOnlyBooleanProperty |
empty
マップが空である場合に
true であるブール型プロパティ。 |
abstract ReadOnlyIntegerProperty |
size
マップのサイズを表す整数プロパティ。
|
コンストラクタと説明 |
---|
MapExpression() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
addListener、removeListener
addListener、removeListener
addListener、removeListener
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public abstract ReadOnlyIntegerProperty sizeProperty
getSize()
public abstract ReadOnlyBooleanProperty emptyProperty
true
であるブール型プロパティ。isEmpty()
public ObservableMap<K,V> getValue()
ObservableValue
ObservableValue
の現在の値を返しますObservableValue<ObservableMap<K,V>>
のgetValue
public static <K,V> MapExpression<K,V> mapExpression(ObservableMapValue<K,V> value)
ObservableMapValue
をラップするMapExpression
を返します。ObservableMapValue
がすでにMapExpression
である場合に返されます。それ以外の場合、ObservableMapValue
にバインドされる新しいMapBinding
が作成されます。value
- ソースObservableMapValue
ObservableMapValue
をラップするMapExpression
NullPointerException
- value
がnull
の場合public int getSize()
public abstract ReadOnlyIntegerProperty sizeProperty()
getSize()
public abstract ReadOnlyBooleanProperty emptyProperty()
true
であるブール型プロパティ。isEmpty()
public ObjectBinding<V> valueAt(K key)
ObjectBinding
を作成します。key
- マッピングのキーObjectBinding
public ObjectBinding<V> valueAt(ObservableValue<K> key)
ObjectBinding
を作成します。key
- マッピングのキーObjectBinding
NullPointerException
- key
がnull
である場合public BooleanBinding isEqualTo(ObservableMap<?,?> other)
other
- 他のObservableMap
BooleanBinding
NullPointerException
- other
がnull
である場合public BooleanBinding isNotEqualTo(ObservableMap<?,?> other)
other
- 他のObservableMap
BooleanBinding
NullPointerException
- other
がnull
である場合public BooleanBinding isNull()
BooleanBinding
public BooleanBinding isNotNull()
BooleanBinding
public StringBinding asString()
String
に変換されたMapExpression
の値を保持するStringBinding
を作成します。このMapExpression
の値が変更される場合、StringBinding
の値が自動的に更新されます。StringBinding
public boolean isEmpty()
public boolean containsKey(Object obj)
containsKey
、インタフェース: Map<K,V>
public boolean containsValue(Object obj)
containsValue
、インタフェース: Map<K,V>
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.