|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.quartz.utils Class PropertiesParser
java.lang.Object org.quartz.utils.PropertiesParser
public class PropertiesParser
- extends Object
This is an utility calss used to parse the properties.
- Author:
- James House
Constructor Summary | |
---|---|
PropertiesParser(Properties props)
|
Method Summary | |
---|---|
boolean |
getBooleanProperty(String name)
|
boolean |
getBooleanProperty(String name,
boolean def)
|
byte |
getByteProperty(String name)
|
byte |
getByteProperty(String name,
byte def)
|
char |
getCharProperty(String name)
|
char |
getCharProperty(String name,
char def)
|
double |
getDoubleProperty(String name)
|
double |
getDoubleProperty(String name,
double def)
|
float |
getFloatProperty(String name)
|
float |
getFloatProperty(String name,
float def)
|
int[] |
getIntArrayProperty(String name)
|
int[] |
getIntArrayProperty(String name,
int[] def)
|
int |
getIntProperty(String name)
|
int |
getIntProperty(String name,
int def)
|
long |
getLongProperty(String name)
|
long |
getLongProperty(String name,
long def)
|
Properties |
getPropertyGroup(String prefix)
|
Properties |
getPropertyGroup(String prefix,
boolean stripPrefix)
|
Properties |
getPropertyGroup(String prefix,
boolean stripPrefix,
String[] excludedPrefixes)
Get all properties that start with the given prefix. |
String[] |
getPropertyGroups(String prefix)
|
short |
getShortProperty(String name)
|
short |
getShortProperty(String name,
short def)
|
String[] |
getStringArrayProperty(String name)
|
String[] |
getStringArrayProperty(String name,
String[] def)
|
String |
getStringProperty(String name)
Get the trimmed String value of the property with the given name . |
String |
getStringProperty(String name,
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. |
Properties |
getUnderlyingProperties()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
PropertiesParser
public PropertiesParser(Properties props)
Method Detail |
---|
getUnderlyingProperties
public Properties getUnderlyingProperties()
getStringProperty
public String getStringProperty(String name)
- Get the trimmed String value of the property with the given
name
. If the value the empty String (after trimming), then it returns null.
getStringProperty
public String getStringProperty(String name, 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.
getStringArrayProperty
public String[] getStringArrayProperty(String name)
getStringArrayProperty
public String[] getStringArrayProperty(String name, String[] def)
getBooleanProperty
public boolean getBooleanProperty(String name)
getBooleanProperty
public boolean getBooleanProperty(String name, boolean def)
getByteProperty
public byte getByteProperty(String name) throws NumberFormatException
- Throws:
NumberFormatException
getByteProperty
public byte getByteProperty(String name, byte def) throws NumberFormatException
- Throws:
NumberFormatException
getCharProperty
public char getCharProperty(String name)
getCharProperty
public char getCharProperty(String name, char def)
getDoubleProperty
public double getDoubleProperty(String name) throws NumberFormatException
- Throws:
NumberFormatException
getDoubleProperty
public double getDoubleProperty(String name, double def) throws NumberFormatException
- Throws:
NumberFormatException
getFloatProperty
public float getFloatProperty(String name) throws NumberFormatException
- Throws:
NumberFormatException
getFloatProperty
public float getFloatProperty(String name, float def) throws NumberFormatException
- Throws:
NumberFormatException
getIntProperty
public int getIntProperty(String name) throws NumberFormatException
- Throws:
NumberFormatException
getIntProperty
public int getIntProperty(String name, int def) throws NumberFormatException
- Throws:
NumberFormatException
getIntArrayProperty
public int[] getIntArrayProperty(String name) throws NumberFormatException
- Throws:
NumberFormatException
getIntArrayProperty
public int[] getIntArrayProperty(String name, int[] def) throws NumberFormatException
- Throws:
NumberFormatException
getLongProperty
public long getLongProperty(String name) throws NumberFormatException
- Throws:
NumberFormatException
getLongProperty
public long getLongProperty(String name, long def) throws NumberFormatException
- Throws:
NumberFormatException
getShortProperty
public short getShortProperty(String name) throws NumberFormatException
- Throws:
NumberFormatException
getShortProperty
public short getShortProperty(String name, short def) throws NumberFormatException
- Throws:
NumberFormatException
getPropertyGroups
public String[] getPropertyGroups(String prefix)
getPropertyGroup
public Properties getPropertyGroup(String prefix)
getPropertyGroup
public Properties getPropertyGroup(String prefix, boolean stripPrefix)
getPropertyGroup
public Properties getPropertyGroup(String prefix, boolean stripPrefix, String[] excludedPrefixes)
- Get all properties that start with the given prefix.
- Parameters:
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 givenprefix
in the result's keys.excludedPrefixes
- Optional array of fully qualified prefixes to exclude. For example ifprefix
is "a.b.c", thenexcludedPrefixes
might be "a.b.c.ignore".- Returns:
- Group of
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 |
Copyright 2001-2011, Terracotta, Inc.