- All Superinterfaces:
- Comparable<Config.Key>,- Config.Key
- Enclosing interface:
- Config
Object represents fully-qualified key of config node.
 
 Fully-qualified key is list of key tokens separated by . (dot character).
 Depending on context the key token is evaluated one by one:
 
- in Config.Type.OBJECTnode the token represents a name of object member;
- in Config.Type.LISTnode 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
 - See Also:
- 
Method SummaryModifier and TypeMethodDescriptionchild(Config.Key key) Create a child key to the current key.static Config.KeyCreates new instance of Key for specifiedkeyliteral.static StringescapeName(String name) Escape'~'to~0and'.'to~1in specified name.booleanisRoot()Returnstruein case the key represents root config node, otherwise it returnsfalse.name()Returns the name of Config node.parent()Returns instance of Key that represents key of parent config node.toString()Returns formatted fully-qualified key.static StringunescapeName(String escapedName) Unescape~0to'~'and~1to'.'in specified escaped name.Methods inherited from interface java.lang.ComparablecompareTo
- 
Method Details- 
parentConfig.Key parent()Returns instance of Key that represents key of parent config node.If the key represents root config node it throws an exception. - Specified by:
- parentin interface- Config.Key
- Returns:
- key that represents key of parent config node.
- Throws:
- IllegalStateException- in case you attempt to call this method on a root node
- See Also:
 
- 
childCreate a child key to the current key.- Specified by:
- childin interface- Config.Key
- Parameters:
- key- child key (relative to current key)
- Returns:
- a new resolved key
 
- 
isRootboolean isRoot()Returnstruein case the key represents root config node, otherwise it returnsfalse.- Specified by:
- isRootin interface- Config.Key
- Returns:
- truein case the key represents root node, otherwise- false.
- Throws:
- ConfigException- if not defined
- See Also:
 
- 
nameString name()Returns the name of Config node.The name of a node is the last token in fully-qualified key. Depending on context the name is evaluated one by one: - in Type#OBJECT} node the name represents a name of object member;
- in Type#LIST} node the name represents an zero-based index of list element, an unsigned base-10 integer value, leading zeros are not allowed.
 - Specified by:
- namein interface- Config.Key
- Returns:
- name of config node
- See Also:
 
- 
toStringString toString()Returns formatted fully-qualified key.- Specified by:
- toStringin interface- Config.Key
- Overrides:
- toStringin class- Object
- Returns:
- formatted fully-qualified key.
 
- 
createCreates new instance of Key for specifiedkeyliteral.Empty literal means root node. Character dot ('.') has special meaning - it separates fully-qualified key by key tokens (node names). - Parameters:
- key- formatted fully-qualified key.
- Returns:
- Key instance representing specified fully-qualified key.
 
- 
escapeNameEscape'~'to~0and'.'to~1in specified name.- Parameters:
- name- name to be escaped
- Returns:
- escaped name
 
- 
unescapeNameUnescape~0to'~'and~1to'.'in specified escaped name.- Parameters:
- escapedName- escaped name
- Returns:
- unescaped name
 
 
-