|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibis.util.TypedProperties
Utility to extract some typed system properties.
Method Summary | |
static boolean |
booleanProperty(java.lang.String name)
Returns true if property name is defined and has a value
that is conventionally associated with 'true' (as in Ant): any of
1, on, true, yes. |
static boolean |
booleanProperty(java.lang.String name,
boolean defaultVal)
Returns true if property name has a value that is
conventionally associated with 'true' (as in Ant): any of
1, on, true, yes. |
static void |
checkProperties(java.lang.String prefix,
java.lang.String[] propnames,
java.lang.String[] excludes)
Check validity of a System property. |
static int |
intProperty(java.lang.String name)
Returns the integer value of property |
static int |
intProperty(java.lang.String name,
int dflt)
Returns the integer value of property |
static long |
longProperty(java.lang.String name)
Returns the long value of property |
static long |
longProperty(java.lang.String name,
long dflt)
Returns the long value of property |
static java.lang.String |
stringProperty(java.lang.String name)
Get value of property |
static java.lang.String |
stringProperty(java.lang.String name,
java.lang.String dflt)
Get value of property |
static boolean |
stringPropertyMatch(java.lang.String name,
java.lang.String match)
Returns true if property name is defined and has a string value that equals match. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean booleanProperty(java.lang.String name)
name
is defined and has a value
that is conventionally associated with 'true' (as in Ant): any of
1, on, true, yes.
name
- property name
public static boolean booleanProperty(java.lang.String name, boolean defaultVal)
name
has a value that is
conventionally associated with 'true' (as in Ant): any of
1, on, true, yes. If the property is not defined, return the specified
default value.
name
- property namedefaultVal
- the value that is returned if the property is absent
public static int intProperty(java.lang.String name)
name
- property name
java.lang.NumberFormatException
- if the property is undefined or not an
integerpublic static int intProperty(java.lang.String name, int dflt)
name
- property namedflt
- default value if the property is undefined
java.lang.NumberFormatException
- if the property defined and not an
integerpublic static long longProperty(java.lang.String name)
name
- property name
java.lang.NumberFormatException
- if the property is undefined or not a
longpublic static long longProperty(java.lang.String name, long dflt)
name
- property namedflt
- default value if the property is undefined
java.lang.NumberFormatException
- if the property defined and not a
longpublic static boolean stringPropertyMatch(java.lang.String name, java.lang.String match)
name
- property namematch
- value to be matched
public static java.lang.String stringProperty(java.lang.String name)
name
- property name
null
if it is not setpublic static java.lang.String stringProperty(java.lang.String name, java.lang.String dflt)
name
- property name
null
if it is not setpublic static void checkProperties(java.lang.String prefix, java.lang.String[] propnames, java.lang.String[] excludes)
prefix
- prefix of checked property names, for instance "satin.".propnames
- list of accepted property names.excludes
- list of property prefixes that should not be checked.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |