public class InputWrapper extends Object implements Input, Map
| Constructor and Description |
|---|
InputWrapper() |
InputWrapper(Input input) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Iterator |
entries() |
Set |
entrySet() |
Object |
get(Object key) |
boolean |
getBoolean(String name) |
boolean |
getBoolean(String name,
boolean def) |
boolean |
getBooleanValue(String name)
Deprecated.
use getBoolean instead
|
boolean |
getBooleanValue(String name,
boolean def)
Deprecated.
use getBoolean instead
|
Date |
getDate(String name)
Parse a parameter value from this input as a Date.
|
Date |
getDate(String name,
int style)
Parse a parameter value from this action input as a Date using the given style.
|
Date |
getDate(String name,
String pattern)
Parse a parameter value from this action input as a Date using the given pattern.
|
double |
getDouble(String name) |
double |
getDouble(String name,
double def) |
double |
getDoubleValue(String name)
Deprecated.
use getDouble instead
|
double |
getDoubleValue(String name,
double def)
Deprecated.
use getDouble instead
|
<E extends Enum<E>> |
getEnum(String name,
Class<E> enumClass)
Convert the parameter value from this action input as an Enum.
|
<E extends Enum<E>> |
getEnums(String name,
Class<E> enumClass)
Convert the parameter value from this action input as an Array of Enums.
|
float |
getFloat(String name) |
float |
getFloat(String name,
float def) |
float |
getFloatValue(String name)
Deprecated.
use getFloat instead
|
float |
getFloatValue(String name,
float def)
Deprecated.
use getFloat instead
|
String |
getHeader(String name)
Gets a header value from this input.
|
Iterator<String> |
getHeaderKeys()
Gets an iterator with all header names.
|
int |
getInt(String name) |
int |
getInt(String name,
int def) |
int[] |
getInts(String name) |
int |
getIntValue(String name)
Deprecated.
use getInt instead
|
int |
getIntValue(String name,
int def)
Deprecated.
use getInt instead
|
int[] |
getIntValues(String name)
Deprecated.
use getInts intead
|
long |
getLong(String name) |
long |
getLong(String name,
long def) |
long[] |
getLongs(String name)
Gets all parameter values with the given name as an long array.
|
long |
getLongValue(String name)
Deprecated.
use getLong instead
|
long |
getLongValue(String name,
long def)
Deprecated.
use getLong instead
|
<E> E |
getObject(Class<? extends E> klass)
Gets a populated object with the values from the action input.
|
<E> E |
getObject(Class<? extends E> klass,
String prefix)
Gets a populated object with the values from the action input.
|
String |
getProperty(String name)
Gets a property associated with this input.
|
Input |
getRoot() |
String |
getString(String name) |
String[] |
getStrings(String name) |
String |
getStringValue(String name)
Deprecated.
use getString instead
|
String[] |
getStringValues(String name)
Deprecated.
use getStrings instead
|
Object |
getValue(String name)
Gets a parameter value (any object) with the given name.
|
boolean |
has(String key)
Check if the input has this key (Shorter verions of hasValue)
|
boolean |
hasValue(String name)
Checks if a value exists.
|
void |
inject(Object bean)
Populates (inject properties) the bean with the values from the input.
|
void |
inject(Object bean,
String prefix)
Populates (inject properties) the bean with the values from the input.
|
boolean |
isEmpty() |
Iterator<String> |
keys()
Gets an iterator with all the parameter names.
|
Set<Object> |
keySet() |
Object |
put(Object key,
Object value) |
void |
putAll(Map map) |
Object |
remove(Object key) |
void |
removeInput() |
void |
removeValue(String name)
Removes a parameter from this input.
|
void |
setInput(Input input) |
void |
setValue(String name,
Object value)
Sets a parameter value with the given name.
|
int |
size() |
Collection<Object> |
values() |
public InputWrapper()
public InputWrapper(Input input)
public void setInput(Input input)
public Input getRoot()
public void removeInput()
public String getHeader(String name)
Inputpublic String getStringValue(String name)
InputgetStringValue in interface Inputname - the parameter's namepublic int getIntValue(String name)
InputgetIntValue in interface Inputname - the parameter's namepublic int getIntValue(String name, int def)
InputgetIntValue in interface Inputname - the parameter's namedef - default value to returnpublic boolean hasValue(String name)
Inputpublic boolean has(String key)
Inputpublic long getLongValue(String name)
InputgetLongValue in interface Inputname - the parameter's namepublic long[] getLongs(String name)
Inputpublic long getLongValue(String name, long def)
InputgetLongValue in interface Inputname - the parameter's namedef - default value to returnpublic float getFloatValue(String name)
InputgetFloatValue in interface Inputname - the parameter's namepublic float getFloatValue(String name, float def)
InputgetFloatValue in interface Inputname - the parameter's namedef - default value to returnpublic double getDoubleValue(String name)
InputgetDoubleValue in interface Inputname - the parameter's namepublic double getDoubleValue(String name, double def)
InputgetDoubleValue in interface Inputname - the parameter's namedef - default value to returnpublic double getDouble(String name, double def)
public boolean getBooleanValue(String name)
InputgetBooleanValue in interface Inputname - the parameter's namepublic boolean getBoolean(String name)
getBoolean in interface Inputpublic boolean getBooleanValue(String name, boolean def)
InputgetBooleanValue in interface Inputname - the parameter's namedef - default value to returnpublic boolean getBoolean(String name, boolean def)
getBoolean in interface Inputpublic String[] getStringValues(String name)
InputgetStringValues in interface Inputname - the parameters'namepublic String[] getStrings(String name)
getStrings in interface Inputpublic int[] getIntValues(String name)
InputgetIntValues in interface Inputname - the parameters'namepublic void setValue(String name, Object value)
Inputpublic Object getValue(String name)
Inputpublic void removeValue(String name)
InputremoveValue in interface Inputname - the name of the parameter to remove.public Iterator<String> keys()
Inputpublic Iterator<String> getHeaderKeys()
InputgetHeaderKeys in interface Inputpublic String getProperty(String name)
InputgetProperty in interface Inputname - the name of the propertypublic <E> E getObject(Class<? extends E> klass)
Inputpublic <E> E getObject(Class<? extends E> klass, String prefix)
Inputpublic void inject(Object bean)
Inputpublic void inject(Object bean, String prefix)
Inputpublic boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic Collection<Object> values()
public Iterator entries()
public Date getDate(String name)
Inputpublic Date getDate(String name, String pattern)
Inputpublic Date getDate(String name, int style)
Inputpublic <E extends Enum<E>> E getEnum(String name, Class<E> enumClass)
InputCopyright © 2015. All Rights Reserved.