public final class ConfigurationPropertyName extends ObjectSE implements ComparableSE<ConfigurationPropertyName>
a-z
"、"0-9
"、"-
" を含めることができます。これらは小文字で、英数字で始める必要があります。"-
" は純粋にフォーマットに使用されます。つまり、"foo-bar
" と "foobar
" は同等と見なされます。 "[
" および "]
" 文字は、連想インデックス(たとえば、Map
SE キーまたは Collection
SE インデックス)を示すために使用され得ます。インデックス名は制限されておらず、大文字と小文字が区別されると見なされます。
ここにいくつかの典型的な例があります:
spring.main.banner-mode
server.hosts[0].name
log[org.springboot].level
of(CharSequence)
, ConfigurationPropertySource
修飾子と型 | クラスと説明 |
---|---|
static class | ConfigurationPropertyName.Form インデックス付けされていない要素の値が取り得るさまざまな形式。 |
修飾子と型 | フィールドと説明 |
---|---|
static ConfigurationPropertyName | EMPTY |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public static final ConfigurationPropertyName EMPTY
public boolean isEmpty()
ConfigurationPropertyName
が空の場合、true
を返します。true
(名前が空の場合)public boolean isLastElementIndexed()
true
(最後の要素にインデックスが付けられている場合)public boolean hasIndexedElement()
true
を返します。public boolean isNumericIndex(int elementIndex)
elementIndex
- 要素のインデックス true
public StringSE getLastElement(ConfigurationPropertyName.Form form)
form
- 返すフォーム public StringSE getElement(int elementIndex, ConfigurationPropertyName.Form form)
elementIndex
- 要素のインデックス form
- 返すフォーム public int getNumberOfElements()
public ConfigurationPropertyName append(StringSE suffix)
ConfigurationPropertyName
を作成します。suffix
- 追加する要素 ConfigurationPropertyName
InvalidConfigurationPropertyNameException
- 結果が有効でない場合 public ConfigurationPropertyName append(ConfigurationPropertyName suffix)
ConfigurationPropertyName
を作成します。suffix
- 追加する要素 ConfigurationPropertyName
public ConfigurationPropertyName getParent()
ConfigurationPropertyName
または EMPTY
の親を返します。public ConfigurationPropertyName chop(int size)
size
- 刻むサイズ public ConfigurationPropertyName subName(int offset)
ConfigurationPropertyName
を返します。例: foo.bar
という名前の chop(1)
は、bar
を返します。offset
- 要素のオフセット public boolean isParentOf(ConfigurationPropertyName name)
true
を返します。name
- チェックする名前 true
public boolean isAncestorOf(ConfigurationPropertyName name)
true
を返します。name
- チェックする名前 true
public int compareTo(ConfigurationPropertyName other)
ComparableSE<ConfigurationPropertyName>
の compareToSE
public int hashCode()
ObjectSE
の hashCodeSE
public StringSE toString()
ObjectSE
の toStringSE
public static boolean isValid(CharSequenceSE name)
true
を返す場合、その名前は例外をスローせずに of(CharSequence)
で使用できます。name
- テストする名前 true
public static ConfigurationPropertyName of(CharSequenceSE name)
ConfigurationPropertyName
を返します。name
- ソース名 ConfigurationPropertyName
インスタンス InvalidConfigurationPropertyNameException
- 名前が無効な場合 public static ConfigurationPropertyName ofIfValid(CharSequenceSE name)
ConfigurationPropertyName
を返します。名前が無効な場合は null
を返します。name
- ソース名 ConfigurationPropertyName
インスタンス public static ConfigurationPropertyName adapt(CharSequenceSE name, char separator)
ConfigurationPropertyName
を作成します。詳細については、adapt(CharSequence, char, Function)
を参照してください。name
- 解析する名前 separator
- 名前を分割するために使用されるセパレータ ConfigurationPropertyName