org.pentaho.di.core.util
Class KeyValueFactory<T>

java.lang.Object
  extended by org.pentaho.di.core.util.KeyValueFactory<T>
Type Parameters:
T - type of key value.

public class KeyValueFactory<T>
extends Object

Author:
Thomas Hoedl(asc042)

Field Summary
static KeyValueFactory<Boolean> BOOLEAN
          Default instance for ...
static KeyValueFactory<Boolean> BOOLEAN_TRUE
          Default instance for ...
static KeyValueFactory<Double> DOUBLE
          Default instance for ...
static KeyValueFactory<Double> DOUBLE_ONE
          Default instance for ...
static KeyValueFactory<Float> FLOAT
          Default instance for ...
static KeyValueFactory<Float> FLOAT_ONE
          Default instance for ...
static KeyValueFactory<Integer> INTEGER
          Default instance for ...
static KeyValueFactory<Integer> INTEGER_ONE
          Default instance for ...
static KeyValueFactory<Long> LONG
          Default instance for ...
static KeyValueFactory<Long> LONG_ONE
          Default instance for ...
static KeyValueFactory<String> STRING
          Default instance for ...
 
Constructor Summary
KeyValueFactory(T defaultValue)
          Constructor.
 
Method Summary
 KeyValue<T> create(String key)
           
 List<KeyValue<T>> createAll(String... keys)
           
 T getDefaultValue()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING

public static final KeyValueFactory<String> STRING
Default instance for ...


INTEGER

public static final KeyValueFactory<Integer> INTEGER
Default instance for ...


INTEGER_ONE

public static final KeyValueFactory<Integer> INTEGER_ONE
Default instance for ...


BOOLEAN

public static final KeyValueFactory<Boolean> BOOLEAN
Default instance for ...


BOOLEAN_TRUE

public static final KeyValueFactory<Boolean> BOOLEAN_TRUE
Default instance for ...


FLOAT

public static final KeyValueFactory<Float> FLOAT
Default instance for ...


FLOAT_ONE

public static final KeyValueFactory<Float> FLOAT_ONE
Default instance for ...


DOUBLE

public static final KeyValueFactory<Double> DOUBLE
Default instance for ...


DOUBLE_ONE

public static final KeyValueFactory<Double> DOUBLE_ONE
Default instance for ...


LONG

public static final KeyValueFactory<Long> LONG
Default instance for ...


LONG_ONE

public static final KeyValueFactory<Long> LONG_ONE
Default instance for ...

Constructor Detail

KeyValueFactory

public KeyValueFactory(T defaultValue)
Constructor.

Parameters:
defaultValue - default value to set.
Method Detail

getDefaultValue

public T getDefaultValue()
Returns:
the defaultValue

create

public KeyValue<T> create(String key)
                   throws IllegalArgumentException
Parameters:
key - key to set.
Returns:
new key value initialized with default value.
Throws:
IllegalArgumentException - if key is blank.

createAll

public List<KeyValue<T>> createAll(String... keys)
                            throws IllegalArgumentException
Parameters:
keys - keys to use.
Returns:
new instances.
Throws:
IllegalArgumentException - if one key is blank.

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()