public class MapPropertySource extends EnumerablePropertySource<MapSE<StringSE,ObjectSE>>
Map
オブジェクトからキーと値を読み取る PropertySource
。getProperty(java.lang.String)
および containsProperty(java.lang.String)
セマンティクスに準拠するために、基になるマップには null
値を含めないでください。PropertiesPropertySource
PropertySource.StubPropertySource
logger, name, source
コンストラクターと説明 |
---|
MapPropertySource(StringSE name, MapSE<StringSE, ObjectSE> source) 指定された名前と Map で新しい MapPropertySource を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
boolean | containsProperty(StringSE name) この PropertySource に、指定された名前のプロパティが含まれているかどうかを返します。 |
ObjectSE | getProperty(StringSE name) 指定された名前に関連付けられた値を返します。見つからない場合は null を返します。 |
StringSE[] | getPropertyNames() ソースオブジェクトに含まれるすべてのプロパティの名前を返します( null は決してしないでください)。 |
equals, getName, getSource, hashCode, named, toString
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public MapPropertySource(StringSE name, MapSE<StringSE,ObjectSE> source)
Map
で新しい MapPropertySource
を作成します。name
- 関連する名前 source
- マップソース (一貫した getProperty(java.lang.String)
および containsProperty(java.lang.String)
動作を得るために null
値なし)@Nullable public ObjectSE getProperty(StringSE name)
PropertySource
null
を返します。PropertySource<MapSE<StringSE, ObjectSE>>
の getProperty
name
- 検索するプロパティ PropertyResolver.getRequiredProperty(String)
public boolean containsProperty(StringSE name)
EnumerablePropertySource
PropertySource
に、指定された名前のプロパティが含まれているかどうかを返します。 この実装は、EnumerablePropertySource.getPropertyNames()
配列内の指定された名前の存在を確認します。
EnumerablePropertySource<MapSE<StringSE, ObjectSE>>
の containsProperty
name
- 検索するプロパティの名前 public StringSE[] getPropertyNames()
EnumerablePropertySource
null
は決してしないでください)。EnumerablePropertySource<MapSE<StringSE, ObjectSE>>
の getPropertyNames