|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IValueMap
A Map interface that holds values, parses Strings, and exposes a
variety of convenience methods.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Method Summary | ||
|---|---|---|
Boolean |
getAsBoolean(String key)
Retrieves a Boolean value by key. |
|
boolean |
getAsBoolean(String key,
boolean defaultValue)
Retrieves a boolean value by key. |
|
Double |
getAsDouble(String key)
Retrieves a Double value by key. |
|
double |
getAsDouble(String key,
double defaultValue)
Retrieves a double value by key. |
|
Duration |
getAsDuration(String key)
Retrieves a Duration value by key. |
|
Duration |
getAsDuration(String key,
Duration defaultValue)
Retrieves a Duration value by key. |
|
|
getAsEnum(String key,
Class<T> eClass)
Retrieves an Enum value by key. |
|
|
getAsEnum(String key,
Class<T> eClass,
T defaultValue)
Retrieves an Enum value by key. |
|
|
getAsEnum(String key,
T defaultValue)
Retrieves an Enum value by key. |
|
Integer |
getAsInteger(String key)
Retrieves an Integer value by key. |
|
int |
getAsInteger(String key,
int defaultValue)
Retrieves an integer value by key. |
|
Long |
getAsLong(String key)
Retrieves a Long value by key. |
|
long |
getAsLong(String key,
long defaultValue)
Retrieves a long value by key. |
|
Time |
getAsTime(String key)
Retrieves a Time value by key. |
|
Time |
getAsTime(String key,
Time defaultValue)
Retrieves a Time value by key. |
|
boolean |
getBoolean(String key)
Retrieves a boolean value by key. |
|
CharSequence |
getCharSequence(String key)
Retrieves a CharSequence by key. |
|
double |
getDouble(String key)
Retrieves a double value by key. |
|
double |
getDouble(String key,
double defaultValue)
Retrieves a double value by key, using a default value if not found. |
|
Duration |
getDuration(String key)
Retrieves a Duration by key. |
|
int |
getInt(String key)
Retrieves an int value by key. |
|
int |
getInt(String key,
int defaultValue)
Retrieves an int value by key, using a default value if not found. |
|
String |
getKey(String key)
Provided that the hash key is a String and you need to access the value ignoring
the key's case (upper- or lowercase letters), then you may use this method to get the correct
writing. |
|
long |
getLong(String key)
Retrieves a long value by key. |
|
long |
getLong(String key,
long defaultValue)
Retrieves a long value by key, using a default value if not found. |
|
String |
getString(String key)
Retrieves a String by key. |
|
String |
getString(String key,
String defaultValue)
Retrieves a String by key, using a default value if not found. |
|
String[] |
getStringArray(String key)
Retrieves a String array by key. |
|
StringValue |
getStringValue(String key)
Retrieves a StringValue object by key. |
|
Time |
getTime(String key)
Retrieves a Time object by key. |
|
boolean |
isImmutable()
Returns whether or not this IValueMap is immutable. |
|
IValueMap |
makeImmutable()
Makes this IValueMap immutable by changing the underlying map representation to
a Collections.unmodifiableMap. |
|
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Method Detail |
|---|
boolean getBoolean(String key)
throws StringValueConversionException
boolean value by key.
key - the key
StringValueConversionException
double getDouble(String key)
throws StringValueConversionException
double value by key.
key - the key
StringValueConversionException
double getDouble(String key,
double defaultValue)
throws StringValueConversionException
double value by key, using a default value if not found.
key - the keydefaultValue - value to use if no value is in this IValueMap
StringValueConversionException
Duration getDuration(String key)
throws StringValueConversionException
Duration by key.
key - the key
Duration value
StringValueConversionException
int getInt(String key)
throws StringValueConversionException
int value by key.
key - the key
StringValueConversionException
int getInt(String key,
int defaultValue)
throws StringValueConversionException
int value by key, using a default value if not found.
key - the keydefaultValue - value to use if no value is in this IValueMap
StringValueConversionException
long getLong(String key)
throws StringValueConversionException
long value by key.
key - the key
StringValueConversionException
long getLong(String key,
long defaultValue)
throws StringValueConversionException
long value by key, using a default value if not found.
key - the keydefaultValue - value to use if no value in this IValueMap
StringValueConversionException
String getString(String key,
String defaultValue)
String by key, using a default value if not found.
key - the keydefaultValue - default value to return if value is null
StringString getString(String key)
String by key.
key - the key
StringCharSequence getCharSequence(String key)
CharSequence by key.
key - the key
CharSequenceString[] getStringArray(String key)
String array by key. If the value was a String[] it
will be returned directly. If it was a String it will be converted to a
String array of length one. If it was an array of another type, a
String array will be made and each element will be converted to a
String.
key - the key
String array of that keyStringValue getStringValue(String key)
StringValue object by key.
key - the key
StringValue object
Time getTime(String key)
throws StringValueConversionException
Time object by key.
key - the key
Time object
StringValueConversionExceptionboolean isImmutable()
IValueMap is immutable.
IValueMap is immutableIValueMap makeImmutable()
IValueMap immutable by changing the underlying map representation to
a Collections.unmodifiableMap. After calling this method, any attempt to modify
this IValueMap will result in a RuntimeException being thrown by
the Collections framework.
IValueMapString getKey(String key)
String and you need to access the value ignoring
the key's case (upper- or lowercase letters), then you may use this method to get the correct
writing.
key - the key
Boolean getAsBoolean(String key)
Boolean value by key.
key - the key
IValueMap
boolean getAsBoolean(String key,
boolean defaultValue)
boolean value by key.
key - the keydefaultValue - the default to return
IValueMapInteger getAsInteger(String key)
Integer value by key.
key - the key
IValueMap
int getAsInteger(String key,
int defaultValue)
integer value by key.
key - the keydefaultValue - the default to return
IValueMapLong getAsLong(String key)
Long value by key.
key - the key
IValueMap
long getAsLong(String key,
long defaultValue)
long value by key.
key - the keydefaultValue - the default to return
IValueMapDouble getAsDouble(String key)
Double value by key.
key - the key
IValueMap
double getAsDouble(String key,
double defaultValue)
double value by key.
key - the keydefaultValue - the default to return
IValueMapDuration getAsDuration(String key)
Duration value by key.
key - the key
IValueMap
Duration getAsDuration(String key,
Duration defaultValue)
Duration value by key.
key - the keydefaultValue - the default to return
IValueMapTime getAsTime(String key)
Time value by key.
key - the key
IValueMap
Time getAsTime(String key,
Time defaultValue)
Time value by key.
key - the keydefaultValue - the default to return
IValueMap
<T extends Enum<T>> T getAsEnum(String key,
Class<T> eClass)
Enum value by key.
T - type of enumkey - the keyeClass - the enumeration class
IValueMap
<T extends Enum<T>> T getAsEnum(String key,
T defaultValue)
Enum value by key.
T - type of enumkey - the keydefaultValue - the default value from the Enumeration (cannot be null)
IValueMap
<T extends Enum<T>> T getAsEnum(String key,
Class<T> eClass,
T defaultValue)
Enum value by key.
T - type of enumkey - the keyeClass - the enumeration classdefaultValue - the default value from the Enumeration (may be null)
IValueMap
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||