public abstract class InputObject extends ProviderUtil
| Modifier and Type | Field and Description |
|---|---|
protected Map |
map |
KEY_CHILD_RESOURCE, KEY_CHILD_RESOURCES, KEY_COMMAND, KEY_COMMANDS, KEY_ENTITY, KEY_METHODS| Constructor and Description |
|---|
InputObject() |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String key)
Get the value object associated with a key.
|
boolean |
getBoolean(String key)
Get the boolean value associated with a key.
|
double |
getDouble(String key)
Get the double value associated with a key.
|
int |
getInt(String key)
Get the int value associated with a key.
|
long |
getLong(String key)
Get the long value associated with a key.
|
String |
getString(String key)
Get the string associated with a key.
|
boolean |
has(String key)
Determine if the InputObject contains a specific key.
|
abstract Map |
initializeMap()
Get the map of key-value pairs represented by this object.
|
boolean |
isNull(String key)
Determine if the value associated with the key is null or if there is
no value.
|
Iterator |
keys()
Get an enumeration of the keys of the InputObject.
|
int |
length()
Get the number of keys stored in the InputObject.
|
InputObject |
put(String key,
Object value)
Put a key/value pair in this object, but only if the key and the
value are both non-null, and only if there is not already a member
with that name.
|
InputObject |
putMap(String key,
Map value) |
static Object |
stringToValue(String s)
Try to convert a string into a number, boolean, or null.
|
getElementLink, getEndXmlElement, getHint, getHtmlForComponent, getHtmlHeader, getHtmlRepresentationForAttributes, getHtmlRespresentationsForCommand, getJsonForMethodMetaData, getJsonForMethodMetaData, getStartXmlElement, getStatistic, getStatistics, getStringMap, getXmlForMethodMetaData, jsonValue, quote, readAsString, slashToDashprotected Map map
public abstract Map initializeMap() throws InputException
InputExceptionpublic Object get(String key) throws InputException
key - A key string.InputException - if the key is not found.public boolean getBoolean(String key) throws InputException
key - A key string.InputException - if the value is not a Boolean or the String "true" or "false".public double getDouble(String key) throws InputException
key - A key string.InputException - if the key is not found or
if the value is not a Number object and cannot be converted to a number.public int getInt(String key) throws InputException
key - A key string.InputException - if the key is not found or if the value cannot
be converted to an integer.public long getLong(String key) throws InputException
key - A key string.InputException - if the key is not found or if the value cannot
be converted to a long.public String getString(String key) throws InputException
key - A key string.InputException - if the key is not found.public boolean has(String key)
key - A key string.public boolean isNull(String key)
key - A key string.public Iterator keys()
public int length()
public static Object stringToValue(String s)
s - A String.public InputObject put(String key, Object value) throws InputException
key - value. - It should be of one of these types: Boolean, Double,
Integer, Long, String, or null.InputException - if the key is a duplicatepublic InputObject putMap(String key, Map value)
Copyright © 2017. All rights reserved.