public class XMLPreferences extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
XMLPreferences.XMLPreferencesRoot |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
absolutePath() |
java.util.ArrayList<java.lang.String> |
childrenNames() |
void |
clean()
Remove all non element nodes
|
void |
clear()
Remove all direct children of this node
|
boolean |
exists()
Return true if current node is existing
|
java.lang.String |
get(java.lang.String key,
java.lang.String def) |
boolean |
getBoolean(java.lang.String key,
boolean def) |
byte[] |
getBytes(java.lang.String key,
byte[] def) |
java.util.ArrayList<XMLPreferences> |
getChildren() |
double |
getDouble(java.lang.String key,
double def) |
float |
getFloat(java.lang.String key,
float def) |
int |
getInt(java.lang.String key,
int def) |
long |
getLong(java.lang.String key,
long def) |
XMLPreferences |
getParent() |
org.w3c.dom.Element |
getXMLNode()
Return the
XMLPreferences node as an XML node. |
java.util.ArrayList<java.lang.String> |
keys() |
java.lang.String |
name() |
XMLPreferences |
node(java.lang.String name)
Return XMLPreferences of specified node.
|
boolean |
nodeExists(java.lang.String name)
Return true if specified node exists
|
XMLPreferences |
nodeForClass(java.lang.Object object)
Return XMLPreferences of specified node using class name of specified object.
|
boolean |
nodeForClassExists(java.lang.Object object)
Return true if node for specified object exists.
|
void |
put(java.lang.String key,
java.lang.String value) |
void |
putBoolean(java.lang.String key,
boolean value) |
void |
putBytes(java.lang.String key,
byte[] value) |
void |
putDouble(java.lang.String key,
double value) |
void |
putFloat(java.lang.String key,
float value) |
void |
putInt(java.lang.String key,
int value) |
void |
putLong(java.lang.String key,
long value) |
void |
remove()
Remove current section
|
void |
remove(java.lang.String name)
Remove specified section
|
void |
removeChildren()
Remove all sections
|
public java.lang.String absolutePath()
public java.lang.String name()
public XMLPreferences getParent()
public java.util.ArrayList<XMLPreferences> getChildren()
public java.util.ArrayList<java.lang.String> childrenNames()
public XMLPreferences node(java.lang.String name)
public XMLPreferences nodeForClass(java.lang.Object object)
nodeForClass(object) == node(object.getClass().getName())
nodeForClass("text") == node("java.lang.String")
public org.w3c.dom.Element getXMLNode()
XMLPreferences
node as an XML node.public boolean exists()
public boolean nodeExists(java.lang.String name)
public boolean nodeForClassExists(java.lang.Object object)
nodeForClassExists(object) == nodeExists(object.getClass().getName())
nodeForClassExists("text") == nodeExists("java.lang.String")
public java.util.ArrayList<java.lang.String> keys()
public void clean()
public void clear()
public void remove()
public void remove(java.lang.String name)
public void removeChildren()
public java.lang.String get(java.lang.String key, java.lang.String def)
public boolean getBoolean(java.lang.String key, boolean def)
public byte[] getBytes(java.lang.String key, byte[] def)
public double getDouble(java.lang.String key, double def)
public float getFloat(java.lang.String key, float def)
public int getInt(java.lang.String key, int def)
public long getLong(java.lang.String key, long def)
public void put(java.lang.String key, java.lang.String value)
public void putBoolean(java.lang.String key, boolean value)
public void putBytes(java.lang.String key, byte[] value)
public void putDouble(java.lang.String key, double value)
public void putFloat(java.lang.String key, float value)
public void putInt(java.lang.String key, int value)
public void putLong(java.lang.String key, long value)