|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.core.util.KeyValue<T>
T
- type of valuepublic class KeyValue<T>
Field Summary | |
---|---|
static List<String> |
DEFAULT_TRUE_VALUES
The default true values. |
static String |
VALID_KEY_CHARS
Valid key characters. |
Constructor Summary | |
---|---|
KeyValue(String key)
Constructor. |
|
KeyValue(String key,
T value)
Constructor. |
Method Summary | |
---|---|
static void |
assertKey(String lowerKey)
|
Boolean |
booleanValue()
Uses DEFAULT_TRUE_VALUES, ignore case. |
Boolean |
booleanValue(Boolean defaultValue)
|
Boolean |
booleanValue(List<String> trueValues)
|
Boolean |
booleanValue(List<String> trueValues,
boolean ignoreCase)
|
Boolean |
booleanValue(String... trueValues)
|
Double |
doubleValue()
|
Double |
doubleValue(Double defaultValue)
|
Float |
floatValue()
|
Float |
floatValue(Float defaultValue)
|
String |
getKey()
|
T |
getValue()
|
Integer |
integerValue()
|
Integer |
integerValue(Integer defaultValue)
|
Long |
longValue()
|
Long |
longValue(Long defaultValue)
|
void |
setValue(T value)
|
String |
stringValue()
|
String |
stringValue(String defaultValue)
|
String |
stringValueDefaultIfBlank(String defaultValue)
|
String |
toString()
|
T |
value()
|
KeyValue<T> |
value(T newValue)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final List<String> DEFAULT_TRUE_VALUES
public static final String VALID_KEY_CHARS
Constructor Detail |
---|
public KeyValue(String key, T value) throws IllegalArgumentException
key
- key to set.value
- value to set, may be null.
IllegalArgumentException
- if key is invalid.public KeyValue(String key) throws IllegalArgumentException
key
- key to set.
IllegalArgumentException
- if key is invalid.Method Detail |
---|
public static final void assertKey(String lowerKey) throws IllegalArgumentException
lowerKey
- key to test.
IllegalArgumentException
- if key is invalid.public String getKey()
public T getValue()
public void setValue(T value)
value
- the value to setpublic KeyValue<T> value(T newValue)
newValue
- value to set.
public T value()
public Boolean booleanValue(String... trueValues)
trueValues
- string true values, case is ignored.
public Boolean booleanValue(List<String> trueValues)
trueValues
- string true values, case is ignored.
public Boolean booleanValue(List<String> trueValues, boolean ignoreCase)
trueValues
- string true values.ignoreCase
- ignore case?
public Boolean booleanValue()
public Boolean booleanValue(Boolean defaultValue)
defaultValue
- the default value
public String stringValue()
public String stringValue(String defaultValue)
defaultValue
- the default value.
public String stringValueDefaultIfBlank(String defaultValue)
defaultValue
- the default value.
public Integer integerValue() throws NumberFormatException
NumberFormatException
- if string value of value cannot be converted to Integerpublic Integer integerValue(Integer defaultValue)
defaultValue
- the default value.
public Long longValue() throws NumberFormatException
NumberFormatException
- if string value of value cannot be converted to Longpublic Long longValue(Long defaultValue)
defaultValue
- the default value.
public Double doubleValue() throws NumberFormatException
NumberFormatException
- if string value of value cannot be converted to Doublepublic Double doubleValue(Double defaultValue)
defaultValue
- the default value.
public Float floatValue() throws NumberFormatException
NumberFormatException
- if string value of value cannot be converted to Floatpublic Float floatValue(Float defaultValue)
defaultValue
- the default value.
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |