public class ValuesEmulator
extends java.lang.Object
IData
Constructor and Description |
---|
ValuesEmulator() |
Modifier and Type | Method and Description |
---|---|
static java.util.Enumeration |
elements(IData data)
Enumerates the values in the specified IData object.
|
static java.lang.Object |
get(IData pipeline,
java.lang.String key)
Gets the value from the specified key.
|
static boolean |
getBoolean(IData pipeline,
java.lang.String key)
Returns a boolean value indicating the value of a specified key.
|
static int |
getInt(IData pipeline,
java.lang.String key)
Returns the value of the specified key as an int.
|
static int |
getInt(IData pipeline,
java.lang.String key,
int def)
Returns the value of the specified key as a int or returns a default value if that element
is not an int or cannot be converted to an int.
|
static java.lang.String[] |
getKeys(IData data)
Returns a string array containing the names of keys in the specified IData object.
|
static java.lang.String |
getNonEmptyString(IData pipeline,
java.lang.String key)
Returns a String representation of the value at the specified key only if that key
contains a non-whitespace value.
|
static java.lang.String |
getString(IData pipeline,
java.lang.String key)
Returns a String representation of the value at the specified key.
|
static java.lang.String[] |
getStringArray(IData pipeline,
java.lang.String key)
Returns the value of the specified key as a String [].
|
static Values |
getValues(IData pipeline,
java.lang.String key)
Returns the value of the specified key as a Values object.
|
static java.util.Enumeration |
keys(IData data)
Enumerates the keys in the specified IData object.
|
static java.lang.Object |
put(IData pipeline,
java.lang.String key,
int value)
Adds the specified int to an IData object at the specified key.
|
static java.lang.Object |
put(IData pipeline,
java.lang.String key,
java.lang.Object value)
Adds the specified Object to an IData object at the specified key.
|
static java.lang.Object |
remove(IData pipeline,
java.lang.String key)
Removes the specified element from the IData object.
|
static int |
size(IData data)
Returns the size of the IData object (that is, the number of key/value pairs in the
IData structure).
|
public static java.lang.Object get(IData pipeline, java.lang.String key)
pipeline
- The IData object that contains the value you want to retrieve.key
- A String specifying the key whose value you want to retrieve.public static java.lang.String getString(IData pipeline, java.lang.String key)
pipeline
- The IData object that contains the value you want to retrieve.key
- A String specifying the key whose value you want to retrieve.getNonEmptyString(com.wm.data.IData, java.lang.String)
public static java.lang.String getNonEmptyString(IData pipeline, java.lang.String key)
pipeline
- The IData object that contains the value you want to retrieve.key
- A String specifying the key whose value you want to retrieve.getString(com.wm.data.IData, java.lang.String)
public static java.lang.String[] getStringArray(IData pipeline, java.lang.String key)
pipeline
- The IData object containing the value you want to retrieve.key
- A String specifying the key whose value you want to retrieve.public static Values getValues(IData pipeline, java.lang.String key)
pipeline
- The IData object containing the value you want to retrieve.key
- A String specifying the key whose value you want to retrieve.public static boolean getBoolean(IData pipeline, java.lang.String key)
pipeline
- The IData object containing the value you want to retrieve.key
- A String specifying the key whose value you want to retrieve.Returns
|
If
|
true | Key contains a Boolean object that is "true" -OR- Key contains a String that has the value "true" (any case) |
false | Key contains a Boolean object that is "false" -OR- Key contains a -OR- Key does not contain a String or a Boolean object |
public static int getInt(IData pipeline, java.lang.String key)
pipeline
- The IData object containing the value you want to retrieve.key
- A String specifying the key whose value you want to retrieve.getInt(IData, String, int)
public static int getInt(IData pipeline, java.lang.String key, int def)
pipeline
- The IData object containing the value you want to retrieve.key
- A String specifying the key whose value you want to retrieve.def
- The int value that getInt will return if the specified key is null or
cannot be converted to an int.getInt(IData, String)
public static java.lang.Object remove(IData pipeline, java.lang.String key)
pipeline
- The IData object containing the value that you want to delete.key
- A String specifying the key of the element that you want to delete.public static java.lang.Object put(IData pipeline, java.lang.String key, java.lang.Object value)
pipeline
- The IData object into which you want to add an element.key
- A String specifying the new element's key.value
- The Object that is to be added at the specified key.public static java.lang.Object put(IData pipeline, java.lang.String key, int value)
key
- A String specifying the new element's key.value
- The int that is to be added as the value of the specified key.public static int size(IData data)
public static java.util.Enumeration keys(IData data)
public static java.util.Enumeration elements(IData data)
public static java.lang.String[] getKeys(IData data)
data
- the IData object whose keys you want to obtain.