public class YAMLNode extends Object
| Constructor and Description |
|---|
YAMLNode(Map<String,Object> root,
boolean writeDefaults) |
| Modifier and Type | Method and Description |
|---|---|
YAMLNode |
addNode(String path)
Adds a new node to the given path.
|
void |
clear()
Clear all nodes.
|
List<BlockVector2D> |
getBlockVector2dList(String path,
List<BlockVector2D> def)
Gets a list of 2D vectors.
|
Boolean |
getBoolean(String path)
Gets a boolean at a location.
|
boolean |
getBoolean(String path,
boolean def)
Gets a boolean at a location.
|
List<Boolean> |
getBooleanList(String path,
List<Boolean> def)
Gets a list of booleans.
|
Double |
getDouble(String path)
Gets a double at a location.
|
double |
getDouble(String path,
double def)
Gets a double at a location.
|
List<Double> |
getDoubleList(String path,
List<Double> def)
Gets a list of doubles.
|
Integer |
getInt(String path)
Gets an integer at a location.
|
int |
getInt(String path,
int def)
Gets an integer at a location.
|
List<Integer> |
getIntList(String path,
List<Integer> def)
Gets a list of integers.
|
List<String> |
getKeys(String path)
Get a list of keys at a location.
|
List<Object> |
getList(String path)
Gets a list of objects at a location.
|
Map<String,Object> |
getMap()
Return the underlying map.
|
YAMLNode |
getNode(String path)
Get a configuration node at a path.
|
List<YAMLNode> |
getNodeList(String path,
List<YAMLNode> def)
Gets a list of nodes.
|
Map<String,YAMLNode> |
getNodes(String path)
Get a list of nodes at a location.
|
Object |
getProperty(String path)
Gets a property at a location.
|
String |
getString(String path)
Gets a string at a location.
|
String |
getString(String path,
String def)
Gets a string at a location.
|
List<String> |
getStringList(String path,
List<String> def)
Gets a list of strings.
|
Vector |
getVector(String path)
Gets a vector at a location.
|
Vector |
getVector(String path,
Vector def)
Gets a string at a location.
|
Vector2D |
getVector2d(String path)
Gets a 2D vector at a location.
|
List<Vector2D> |
getVector2dList(String path,
List<Vector2D> def)
Gets a list of 2D vectors.
|
List<Vector> |
getVectorList(String path,
List<Vector> def)
Gets a list of vectors.
|
void |
removeProperty(String path)
Remove the property at a location.
|
void |
setProperty(String path,
Object value)
Set the property at a location.
|
void |
setWriteDefaults(boolean writeDefaults) |
boolean |
writeDefaults() |
public void clear()
public Object getProperty(String path)
path - path to node (dot notation)public void setProperty(String path, Object value)
path - value - public YAMLNode addNode(String path)
setProperty.path - public String getString(String path)
path - path to node (dot notation)public Vector getVector(String path)
path - path to node (dot notation)public Vector2D getVector2d(String path)
path - path to node (dot notation)public Vector getVector(String path, Vector def)
path - path to node (dot notation)def - default valuepublic String getString(String path, String def)
path - path to node (dot notation)def - default valuepublic Integer getInt(String path)
path - path to node (dot notation)public int getInt(String path, int def)
path - path to node (dot notation)def - default valuepublic Double getDouble(String path)
path - path to node (dot notation)public double getDouble(String path, double def)
path - path to node (dot notation)def - default valuepublic Boolean getBoolean(String path)
path - path to node (dot notation)public boolean getBoolean(String path, boolean def)
path - path to node (dot notation)def - default valuepublic List<String> getKeys(String path)
path - path to node (dot notation)public List<Object> getList(String path)
path - path to node (dot notation)public List<String> getStringList(String path, List<String> def)
path - path to node (dot notation)def - default value or null for an empty list as defaultpublic List<Integer> getIntList(String path, List<Integer> def)
path - path to node (dot notation)def - default value or null for an empty list as defaultpublic List<Double> getDoubleList(String path, List<Double> def)
path - path to node (dot notation)def - default value or null for an empty list as defaultpublic List<Boolean> getBooleanList(String path, List<Boolean> def)
path - path to node (dot notation)def - default value or null for an empty list as defaultpublic List<Vector> getVectorList(String path, List<Vector> def)
path - path to node (dot notation)def - default value or null for an empty list as defaultpublic List<Vector2D> getVector2dList(String path, List<Vector2D> def)
path - path to node (dot notation)def - default value or null for an empty list as defaultpublic List<BlockVector2D> getBlockVector2dList(String path, List<BlockVector2D> def)
path - path to node (dot notation)def - default value or null for an empty list as defaultpublic List<YAMLNode> getNodeList(String path, List<YAMLNode> def)
path - path to node (dot notation)def - default value or null for an empty list as defaultpublic YAMLNode getNode(String path)
path - public Map<String,YAMLNode> getNodes(String path)
path - path to node (dot notation)public void removeProperty(String path)
path - public boolean writeDefaults()
public void setWriteDefaults(boolean writeDefaults)
Copyright © 2010-2014. All Rights Reserved.