|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPropsRS
public class PropsRS
Inspired by the J2SE Properties
class, this one uses
RecordStore
s to store properties.
Constructor Summary | |
---|---|
PropsRS(java.lang.String name)
Creates a new PropsRS object to access the
record store whose name is specified by the parameter. |
Method Summary | |
---|---|
static boolean |
delete(java.lang.String name)
Deletes a record store. |
java.lang.String |
get(java.lang.String key)
Gets the property that matches the given key. |
int |
getInt(java.lang.String key)
Gets the property the matches the given key, assuming that the property represents an integer. |
boolean |
save()
Saves the properties entered via the set methods in the
record store. |
boolean |
set(java.lang.String key,
int value)
Sets a new property, described by an integer. |
boolean |
set(java.lang.String key,
java.lang.String value)
Sets a new property. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropsRS(java.lang.String name)
PropsRS
object to access the
record store whose name is specified by the parameter.
name
- the name of the record storeMethod Detail |
---|
public java.lang.String get(java.lang.String key)
key
- the key
public int getInt(java.lang.String key)
key
- the key
Integer.MIN_VALUE
if the property does not exist or does not
represent a valid integerpublic boolean set(java.lang.String key, java.lang.String value)
\t
character because this class uses it as a separator.
key
- the keyvalue
- the value of the property
true
if the property is set successfully,
false
if the key is null, the key contains the \t
character, or if the value is nullpublic boolean set(java.lang.String key, int value)
\t
character because this class uses it as
a separator.
key
- the keyvalue
- the value of the property
true
if the property is set successfully,
false
if the key is null, or if the key contains the
\t
characterpublic boolean save()
set
methods in the
record store.
true
if the record store is saved successfully,
false
otherwisepublic static boolean delete(java.lang.String name)
name
- the name of the record store
true
if the record store is deleted successfully,
false
if the record store can not be deleted
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |