public static interface Config.Key extends Comparable<Config.Key>
Fully-qualified key is list of key tokens separated by . (dot character).
Depending on context the key token is evaluated one by one:
Config.Type.OBJECT node the token represents a name of object member;Config.Type.LIST node the token represents an zero-based index of list element,
an unsigned base-10 integer value, leading zeros are not allowed.The ABNF syntax of config key is:
config-key = *1( key-token *( "." key-token ) )
key-token = *( unescaped / escaped )
unescaped = %x00-2D / %x2F-7D / %x7F-10FFFF
; %x2E ('.') and %x7E ('~') are excluded from 'unescaped'
escaped = "~" ( "0" / "1" )
; representing '~' and '.', respectively
Config.key()| Modifier and Type | Method and Description |
|---|---|
Config.Key |
child(Config.Key key) |
static Config.Key |
create(String key)
Creates new instance of Key for specified
key literal. |
static String |
escapeName(String name)
Escape
'~' to ~0 and '.' to ~1 in specified name. |
default boolean |
isRoot()
Returns
true in case the key represents root config node,
otherwise it returns false. |
String |
name()
Returns the name of Config node.
|
Config.Key |
parent()
Returns instance of Key that represents key of parent config node.
|
String |
toString()
Returns formatted fully-qualified key.
|
static String |
unescapeName(String escapedName)
Unescape
~0 to '~' and ~1 to '.' in specified escaped name. |
compareToConfig.Key parent()
If the key represents root config node it returns null.
isRoot()default boolean isRoot()
true in case the key represents root config node,
otherwise it returns false.true in case the key represents root node, otherwise false.parent()String name()
The name of a node is the last token in fully-qualified key. Depending on context the name is evaluated one by one:
Config.Type.OBJECT node the name represents a name of object member;Config.Type.LIST node the name represents an zero-based index of list element,
an unsigned base-10 integer value, leading zeros are not allowed.Config.name()String toString()
Config.Key child(Config.Key key)
static Config.Key create(String key)
key literal.
Empty literal means root node. Character dot ('.') has special meaning - it separates fully-qualified key by key tokens (node names).
key - formatted fully-qualified key.static String escapeName(String name)
'~' to ~0 and '.' to ~1 in specified name.name - name to be escapedCopyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.