|
JEphem site jephem API Build classes |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--java.util.Properties | +--tig.TigProperties
Superclass for Preferences classes.
The getXxxProperty()
method behave like method getProperty(String key)
, inherited from Properties
class : if the property can't be correctly retrieved, an exception is thrown.
Nested Class Summary |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Field Summary |
Fields inherited from class java.util.Properties |
defaults |
Constructor Summary | |
TigProperties()
|
Method Summary | |
boolean |
getBooleanProperty(java.lang.String key)
Returns a property of type boolean .
|
boolean |
getBooleanProperty(java.lang.String key,
boolean defaultValue)
Returns a property of type boolean .
|
double |
getDoubleProperty(java.lang.String key)
Returns a property of type double .
|
double |
getDoubleProperty(java.lang.String key,
double defaultValue)
Returns a property of type double .
|
int[] |
getIntArrayProperty(java.lang.String key)
Returns a property of type int[] .
|
int[] |
getIntArrayProperty(java.lang.String key,
int[] defaultValue)
Returns a property of type int[] .
|
static int |
getIntConstant(java.lang.String constantName,
java.lang.String className)
Convenient method to get a static final int field of a class, using reflection.
|
int |
getIntProperty(java.lang.String key)
Returns a property of type int . |
int |
getIntProperty(java.lang.String key,
int defaultValue)
Returns a property of type int .
|
void |
setBooleanProperty(java.lang.String key,
boolean booleanValue)
Sets a property of type boolean . |
void |
setDoubleProperty(java.lang.String key,
double doubleValue)
Sets a property of type double . |
void |
setIntArrayProperty(java.lang.String key,
int[] intArray)
Sets a property of type int[] .
|
void |
setIntProperty(java.lang.String key,
int intValue)
Sets a property of type int . |
Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TigProperties()
Method Detail |
public static int getIntConstant(java.lang.String constantName, java.lang.String className)
static final int
field of a class, using reflection.
package mypackage; public class MyClass{ public static final int MY_CONSTANT = 8; }The call :
TigBundle.getIntConstant("My_CONSTANT", "mypackage.MyClass");
will then return 8.
java.lang.RuntimeException
- If the property can't be correctly retrieved.public int getIntProperty(java.lang.String key)
int
.
java.lang.NumberFormatException
- If the property can't be retrieved, or can't be converted to an integer.public int getIntProperty(java.lang.String key, int defaultValue)
int
.
public void setIntProperty(java.lang.String key, int intValue)
int
.
public double getDoubleProperty(java.lang.String key)
double
.
null
is returned.
public double getDoubleProperty(java.lang.String key, double defaultValue)
double
.
public void setDoubleProperty(java.lang.String key, double doubleValue)
double
.
public boolean getBooleanProperty(java.lang.String key)
boolean
.
true
if the property exists and equals (ignoring case) to "true".false
if the property exists and equals (ignoring case) to "false".RuntimeException
is thrown otherwise.
public boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
boolean
.
true
if the property exists and equals (ignoring case) to "true".false
if the property exists and equals (ignoring case) to "false".
public void setBooleanProperty(java.lang.String key, boolean booleanValue)
boolean
.
public int[] getIntArrayProperty(java.lang.String key)
int[]
.
value
corresponding to key
is a Sting, and must contain a list of
substrings which can be parsed to integers, and separated by comas.
"12, 23, 34"
is a correct value.
java.lang.RuntimeException
- If the property corresponding to 'key' can't be parsed that way.public int[] getIntArrayProperty(java.lang.String key, int[] defaultValue)
int[]
.
value
corresponding to key
is a Sting, and must contain a list of
substrings which can be parsed to integers, and separated by comas.
"12, 23, 34"
is a correct value.
public void setIntArrayProperty(java.lang.String key, int[] intArray)
int[]
.
int[]
is transformed to a String.
1, 4, 7, 5
".
int[]
stored this way can be retrived with getIntArrayProperty(String)
|
JEphem site jephem API Build classes |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |