|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.quartz.utils.PropertiesParser
public class PropertiesParser
This is an utility calss used to parse the properties.
Constructor Summary | |
---|---|
PropertiesParser(java.util.Properties props)
|
Method Summary | |
---|---|
boolean |
getBooleanProperty(java.lang.String name)
|
boolean |
getBooleanProperty(java.lang.String name,
boolean def)
|
byte |
getByteProperty(java.lang.String name)
|
byte |
getByteProperty(java.lang.String name,
byte def)
|
char |
getCharProperty(java.lang.String name)
|
char |
getCharProperty(java.lang.String name,
char def)
|
double |
getDoubleProperty(java.lang.String name)
|
double |
getDoubleProperty(java.lang.String name,
double def)
|
float |
getFloatProperty(java.lang.String name)
|
float |
getFloatProperty(java.lang.String name,
float def)
|
int[] |
getIntArrayProperty(java.lang.String name)
|
int[] |
getIntArrayProperty(java.lang.String name,
int[] def)
|
int |
getIntProperty(java.lang.String name)
|
int |
getIntProperty(java.lang.String name,
int def)
|
long |
getLongProperty(java.lang.String name)
|
long |
getLongProperty(java.lang.String name,
long def)
|
java.util.Properties |
getPropertyGroup(java.lang.String prefix)
|
java.util.Properties |
getPropertyGroup(java.lang.String prefix,
boolean stripPrefix)
|
java.util.Properties |
getPropertyGroup(java.lang.String prefix,
boolean stripPrefix,
java.lang.String[] excludedPrefixes)
Get all properties that start with the given prefix. |
java.lang.String[] |
getPropertyGroups(java.lang.String prefix)
|
short |
getShortProperty(java.lang.String name)
|
short |
getShortProperty(java.lang.String name,
short def)
|
java.lang.String[] |
getStringArrayProperty(java.lang.String name)
|
java.lang.String[] |
getStringArrayProperty(java.lang.String name,
java.lang.String[] def)
|
java.lang.String |
getStringProperty(java.lang.String name)
Get the trimmed String value of the property with the given name . |
java.lang.String |
getStringProperty(java.lang.String name,
java.lang.String def)
Get the trimmed String value of the property with the given name or the given default value if the value is
null or empty after trimming. |
java.util.Properties |
getUnderlyingProperties()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesParser(java.util.Properties props)
Method Detail |
---|
public java.util.Properties getUnderlyingProperties()
public java.lang.String getStringProperty(java.lang.String name)
name
. If the value the empty String (after
trimming), then it returns null.
public java.lang.String getStringProperty(java.lang.String name, java.lang.String def)
name
or the given default value if the value is
null or empty after trimming.
public java.lang.String[] getStringArrayProperty(java.lang.String name)
public java.lang.String[] getStringArrayProperty(java.lang.String name, java.lang.String[] def)
public boolean getBooleanProperty(java.lang.String name)
public boolean getBooleanProperty(java.lang.String name, boolean def)
public byte getByteProperty(java.lang.String name) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public byte getByteProperty(java.lang.String name, byte def) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public char getCharProperty(java.lang.String name)
public char getCharProperty(java.lang.String name, char def)
public double getDoubleProperty(java.lang.String name) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public double getDoubleProperty(java.lang.String name, double def) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public float getFloatProperty(java.lang.String name) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public float getFloatProperty(java.lang.String name, float def) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public int getIntProperty(java.lang.String name) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public int getIntProperty(java.lang.String name, int def) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public int[] getIntArrayProperty(java.lang.String name) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public int[] getIntArrayProperty(java.lang.String name, int[] def) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public long getLongProperty(java.lang.String name) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public long getLongProperty(java.lang.String name, long def) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public short getShortProperty(java.lang.String name) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public short getShortProperty(java.lang.String name, short def) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public java.lang.String[] getPropertyGroups(java.lang.String prefix)
public java.util.Properties getPropertyGroup(java.lang.String prefix)
public java.util.Properties getPropertyGroup(java.lang.String prefix, boolean stripPrefix)
public java.util.Properties getPropertyGroup(java.lang.String prefix, boolean stripPrefix, java.lang.String[] excludedPrefixes)
prefix
- The prefix for which to search. If it does not end in
a "." then one will be added to it for search purposes.stripPrefix
- Whether to strip off the given prefix
in the result's keys.excludedPrefixes
- Optional array of fully qualified prefixes to
exclude. For example if prefix
is "a.b.c", then
excludedPrefixes
might be "a.b.c.ignore".
Properties
that start with the given prefix,
optionally have that prefix removed, and do not include properties
that start with one of the given excluded prefixes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |