ru.tehkode.permissions.config
Class ConfigurationNode

java.lang.Object
  extended by org.bukkit.util.config.ConfigurationNode
      extended by ru.tehkode.permissions.config.ConfigurationNode
Direct Known Subclasses:
Configuration

public class ConfigurationNode
extends org.bukkit.util.config.ConfigurationNode

Author:
code

Field Summary
protected static Pattern escapedSplit
           
 
Fields inherited from class org.bukkit.util.config.ConfigurationNode
root
 
Constructor Summary
ConfigurationNode()
           
ConfigurationNode(Map<String,Object> root)
           
 
Method Summary
 ConfigurationNode getNode(String path)
          Get a configuration node at a path.
 List<ConfigurationNode> getNodesList(String path, List<ConfigurationNode> def)
          Get a list of nodes.
 Map<String,ConfigurationNode> getNodesMap(String path)
          Get a list of nodes at a location.
 Object getProperty(String path)
           
 Map<String,Object> getRoot()
           
 void removeProperty(String path)
           
 void setProperty(String path, Object value)
           
protected  String[] splitPath(String path)
           
 
Methods inherited from class org.bukkit.util.config.ConfigurationNode
getAll, getBoolean, getBooleanList, getDouble, getDoubleList, getInt, getIntList, getKeys, getKeys, getList, getNodeList, getNodes, getString, getString, getStringList, recursiveBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

escapedSplit

protected static Pattern escapedSplit
Constructor Detail

ConfigurationNode

public ConfigurationNode()

ConfigurationNode

public ConfigurationNode(Map<String,Object> root)
Method Detail

getRoot

public Map<String,Object> getRoot()

splitPath

protected String[] splitPath(String path)

setProperty

public void setProperty(String path,
                        Object value)
Overrides:
setProperty in class org.bukkit.util.config.ConfigurationNode

removeProperty

public void removeProperty(String path)
Overrides:
removeProperty in class org.bukkit.util.config.ConfigurationNode

getProperty

public Object getProperty(String path)
Overrides:
getProperty in class org.bukkit.util.config.ConfigurationNode

getNodesList

public List<ConfigurationNode> getNodesList(String path,
                                            List<ConfigurationNode> def)
Get a list of nodes. Non-valid entries will not be in the list. There will be no null slots. If the list is not defined, the default will be returned. 'null' can be passed for the default and an empty list will be returned instead. The node must be an actual node and cannot be just a boolean.

Parameters:
path - path to node (dot notation)
def - default value or null for an empty list as default
Returns:
list of integers

getNode

public ConfigurationNode getNode(String path)
Get a configuration node at a path. If the node doesn't exist or the path does not lead to a node, null will be returned. A node has key/value mappings.

Overrides:
getNode in class org.bukkit.util.config.ConfigurationNode
Parameters:
path - path to node (dot notation)
Returns:
ConfigurationNode or null

getNodesMap

public Map<String,ConfigurationNode> getNodesMap(String path)
Get a list of nodes at a location. If the map at the particular location does not exist or it is not a map, null will be returned.

Parameters:
path - path to node (dot notation)
Returns:
map of nodes


Copyright © 2011. All Rights Reserved.