|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.go.aist.rtm.RTC.util.Properties
public class Properties
Property set that consists of key and value
Can keep in the stream, and load it from the stream. The key to each property and the value corresponding to it are character. When default can be specified for the property set, and the key specified by former property set is not found, this second property set is retrieved.
Constructor Summary | |
---|---|
Properties()
Default constructor |
|
Properties(java.util.Map<java.lang.String,java.lang.String> defaults)
Constructor |
|
Properties(Properties prop)
Cpoy constructor |
|
Properties(java.lang.String key)
Constructor |
|
Properties(java.lang.String[] defaults)
Constructor |
|
Properties(java.lang.String key,
java.lang.String value)
Constructor |
Method Summary | |
---|---|
protected java.io.OutputStream |
_dump(java.io.OutputStream out,
Properties curr,
int index)
|
java.lang.String |
_dump(java.lang.String out,
Properties curr,
int index)
makes the content of Properties a character string. |
protected Properties |
_getNode(java.util.Vector<java.lang.String> keys,
int index,
Properties curr)
|
protected void |
_propertyNames(java.util.Vector<java.lang.String> names,
java.lang.String curr_name,
Properties curr)
|
protected void |
_store(java.io.OutputStream out,
java.lang.String curr_name,
Properties curr)
|
void |
clear()
Deletes all his child nodes. |
boolean |
createNode(java.lang.String key)
makes the child node the Properties object of the specified key. |
void |
destruct()
Destructor processing |
protected void |
finalize()
|
Properties |
findNode(java.lang.String key)
Finds node. |
java.lang.String |
getDefault(java.lang.String key)
Gets the default value corresponding to the specified key. |
java.lang.String |
getDefaultValue()
Gets the default value to an object concerned Properties. |
java.util.Vector<Properties> |
getLeaf()
Gets the leaf to an object concerned Properties. |
java.lang.String |
getName()
Gets the key to an object concerned Properties. |
Properties |
getNode(java.lang.String key)
acquires the Properties object that maintains the value corresponding to the specified key. |
java.lang.String |
getProperty(java.lang.String key)
acquires the value corresponding to the specified key. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String alternative)
Gets the value corresponding to the specified key. |
Properties |
getRoot()
Gets the root to an object concerned Properties. |
java.lang.String |
getValue()
Gets the value to an object concerned Properties. |
Properties |
hasKey(java.lang.String key)
examines whether something with the specified key exists in the child node of the Properties object. |
protected java.lang.String |
indent(int index)
|
void |
list(java.io.OutputStream out)
{@.en outputs the content of a Properties object to the specified output stream. |
void |
load(java.io.BufferedReader reader)
Reads the property set from the specified buffer. |
void |
merge(Properties prop)
merges the specified Properties object with an object concerned Properties. |
java.util.Vector<java.lang.String> |
propertyNames()
acquires the list of the key that exists among the Properties object and the child nodes. |
Properties |
removeNode(java.lang.String name)
Separates child node Properties of the specified key from concerned Properties. |
void |
save(java.io.OutputStream out,
java.lang.String header)
Outputs the content of a Properties to the specified stream. |
java.lang.String |
setDefault(java.lang.String key,
java.lang.String defaultValue)
sets the default value corresponding to the specified key. |
void |
setDefaults(java.lang.String[] defaults)
Sets the default value corresponding to the specified key. |
java.lang.String |
setProperty(java.lang.String key,
java.lang.String value)
Registers the value corresponding to the specified key. |
int |
size()
acquires the number of properties that exist among the Properties object and the child nodes. |
protected boolean |
split(java.lang.String str,
char delim,
java.util.Vector<java.lang.String> values)
|
protected Pair<java.lang.String,java.lang.String> |
splitKeyValue(java.lang.String str)
|
void |
store(java.io.OutputStream out,
java.lang.String header)
Outputs the content of a Properties to the specified stream. |
void |
substitute(Properties prop)
copies the Properties object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Properties()
public Properties(java.lang.String key)
The property with the specified key is initialized. The value corresponding to the specified key becomes a null character string.
key
-
keypublic Properties(java.lang.String key, java.lang.String value)
The property with specified key and value is initialized.
key
-
keyvalue
-
valuepublic Properties(java.util.Map<java.lang.String,java.lang.String> defaults)
Default is initialized by the specified data.
defaults
-
Map object with key and value of defaultpublic Properties(java.lang.String[] defaults)
Default is initialized by the specified data.
defaults
-
Default value alternately arranged in order of key and valuepublic Properties(Properties prop)
copies the Properties object.
prop
-
Properties object that becomes copy originMethod Detail |
---|
public void substitute(Properties prop)
prop
-
Properties object that becomes copy originpublic void destruct()
It separates from the parent node clearing the content of the Properties object. Moreover, the destructor of all the child nodes is processed.
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String getName()
public java.lang.String getValue()
public java.lang.String getDefaultValue()
public java.util.Vector<Properties> getLeaf()
public Properties getRoot()
public java.lang.String getProperty(java.lang.String key)
key
-
key
public java.lang.String getProperty(java.lang.String key, java.lang.String alternative)
When the specified key doesn't exist or the value corresponding to the key is a null character string, the specified alternative value is gotten.
key
- i
keyalternative
-
Alternative value
public java.lang.String getDefault(java.lang.String key)
key
-
key
public java.lang.String setProperty(java.lang.String key, java.lang.String value)
key
-
keyvalue
-
value
public java.lang.String setDefault(java.lang.String key, java.lang.String defaultValue)
key
-
keydefaultValue
-
Default valuepublic void setDefaults(java.lang.String[] defaults)
defaults
-
Default value in which key and value are alternately displayedpublic void list(java.io.OutputStream out)
out
-
output streampublic void load(java.io.BufferedReader reader) throws java.io.IOException
reader
-
buffer
java.io.IOException
public void save(java.io.OutputStream out, java.lang.String header)
out
-
output streamheader
-
String added to head of content of outputpublic void store(java.io.OutputStream out, java.lang.String header)
out
-
output streamheader
-
String added to head of content of outputpublic final java.util.Vector<java.lang.String> propertyNames()
public final int size()
public final Properties findNode(java.lang.String key)
key
-
key
public final Properties getNode(java.lang.String key)
key
-
key
public boolean createNode(java.lang.String key)
key
-
key
public Properties removeNode(java.lang.String name)
name
-
Key to child node that separates
public final Properties hasKey(java.lang.String key)
key
-
key
public void clear()
public void merge(Properties prop)
prop
-
Properties object in merging originprotected Pair<java.lang.String,java.lang.String> splitKeyValue(java.lang.String str)
str
-
protected boolean split(java.lang.String str, char delim, java.util.Vector<java.lang.String> values)
str
- delim
-
protected java.lang.String indent(int index)
protected Properties _getNode(java.util.Vector<java.lang.String> keys, int index, Properties curr)
protected void _propertyNames(java.util.Vector<java.lang.String> names, java.lang.String curr_name, Properties curr)
protected void _store(java.io.OutputStream out, java.lang.String curr_name, Properties curr)
protected java.io.OutputStream _dump(java.io.OutputStream out, Properties curr, int index)
public java.lang.String _dump(java.lang.String out, Properties curr, int index)
out
-
String for outputcurr
-
Propertiesindex
-
Hierarchy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |