
.preferences.preferences-xml.1.2.2.source-code.Preferences.xsd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of preferences-xml Show documentation
Show all versions of preferences-xml Show documentation
An implementation of the Java Preferences API (java.util.prefs) to store preferences in an XML file, in a subdirectory of a Java program's working directory.
/**
* Default constructor.
*/
public XMLRoot() {
}
/**
* Constructor, set the name of this node.
*
* @param name
*/
public XMLRoot(String name) {
super(name);
}
/**
* Default constructor.
*/
public XMLNode() {
}
/**
* Constructor, set the name of this node.
*
* @param name
*/
public XMLNode(String name) {
this.name = name;
}
/**
* Compares preferences nodes. Nodes are equal if they share the same
* 'package' name.
*
* @return <tt>true</tt> if both objects share the same package name,
* <tt>false</tt> otherwise.
*/
@Override
public boolean equals(Object o) {
return o instanceof XMLNode && ((XMLNode)o).name.equals(name);
}
/**
* Default constructor.
*/
public XMLEntry() {
}
/**
* Constructor, set the key and value of the entry.
*
* @param key
* @param value
*/
public XMLEntry(String key, String value) {
this.key = key;
this.value = value;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy