|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vladnput.VladUtil
public class VladUtil
Various static utility routines.
Field Summary | |
---|---|
static java.util.regex.Pattern |
INTERPOLATE_REGEX
The regular expression defining what variables in message bodies look like. |
Method Summary | ||
---|---|---|
static java.lang.Boolean |
booleanKey(java.util.Map<java.lang.String,java.lang.Object> args,
java.lang.String key)
Removes and returns the mapping associated with key in args, or null if there is not one. |
|
static java.util.Date |
dateKey(java.util.Map<java.lang.String,java.lang.Object> args,
java.lang.String key,
java.text.DateFormat format)
Removes and returns the string mapping associated with key in args after parsing it as a date, or null if there is not one. |
|
static java.lang.Double |
floatKey(java.util.Map<java.lang.String,java.lang.Object> args,
java.lang.String key)
Removes and returns the mapping associated with key in args, or null if there is not one. |
|
static java.lang.Integer |
integerKey(java.util.Map<java.lang.String,java.lang.Object> args,
java.lang.String key)
Removes and returns the mapping associated with key in args, or null if there is not one. |
|
static java.lang.String |
interpolate(java.lang.String text,
VladMessageVars vars)
Replaces all variable references within text with the variable values in vars. |
|
static
|
newArrayList()
Uses type-inference to make ArrayList declarations compact. |
|
static
|
newHashMap()
Uses type-inference to make HashMap declarations compact. |
|
static
|
newHashSet()
Uses type-inference to make HashSet declarations compact. |
|
static
|
newLinkedHashMap()
Uses type-inference to make LinkedHashMap declarations compact. |
|
static java.util.Date |
parseDate(java.lang.String value,
java.text.DateFormat format)
Parses value as a date using format. |
|
static java.lang.String |
stringKey(java.util.Map<java.lang.String,java.lang.Object> args,
java.lang.String key)
Removes and returns the mapping associated with key in args, or null if there is not one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.regex.Pattern INTERPOLATE_REGEX
Method Detail |
---|
public static java.lang.String stringKey(java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String key)
args
- Argumentskey
- Argument name
public static java.lang.Integer integerKey(java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String key)
args
- Argumentskey
- Argument name
public static java.lang.Double floatKey(java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String key)
args
- Argumentskey
- Argument name
public static java.lang.Boolean booleanKey(java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String key)
args
- Argumentskey
- Argument name
public static java.util.Date dateKey(java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String key, java.text.DateFormat format) throws java.lang.IllegalArgumentException
args
- Argumentskey
- Argument nameformat
- Date format
java.lang.IllegalArgumentException
- If the date is invalidpublic static java.util.Date parseDate(java.lang.String value, java.text.DateFormat format) throws java.lang.IllegalArgumentException
value
- Value to parseformat
- Date format
java.lang.IllegalArgumentException
- If the date is invalidpublic static java.lang.String interpolate(java.lang.String text, VladMessageVars vars)
text
- Text to replace variables invars
- Variable values to replace with
public static <K,V> java.util.HashMap<K,V> newHashMap()
public static <K,V> java.util.LinkedHashMap<K,V> newLinkedHashMap()
public static <V> java.util.ArrayList<V> newArrayList()
public static <V> java.util.HashSet<V> newHashSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |