public abstract class AbstractInput extends Object implements Input
| Constructor and Description |
|---|
AbstractInput() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBoolean(String name)
Calls getStringValue() and tries to convert the string to boolean.
|
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)
Calls getString() and tries to convert the string to a double.
|
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 key,
Class<E> enumClass)
Convert the parameter value from this action input as an Enum.
|
<E extends Enum<E>> |
getEnums(String key,
Class<E> enumClass)
Convert the parameter value from this action input as an Array of Enums.
|
float |
getFloat(String name)
Calls getString() and tries to convert the string to a float.
|
float |
getFloat(String name,
float def) |
float |
getFloatValue(String name)
Deprecated.
use getFloat instead
|
float |
getFloatValue(String name,
float def)
Deprecated.
use getFloat instead
|
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 instead
|
protected abstract Locale |
getLocale() |
long |
getLong(String name)
Calls getString() and tries to convert the string to a long.
|
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,
boolean convertBoolean) |
<E> E |
getObject(Class<? extends E> klass,
String prefix)
Gets a populated object with the values from the action input.
|
<E> E |
getObject(Class<? extends E> klass,
String prefix,
boolean convertBoolean) |
<E> E |
getObject(E bean,
boolean convertBoolean) |
<E> E |
getObject(E bean,
String prefix,
boolean convertBoolean) |
<E> E |
getObject(E target,
String prefix,
boolean tryField,
boolean tryToConvert,
boolean convertBoolean) |
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.
|
static boolean |
isB() |
static void |
main(String[] args) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHeader, getHeaderKeys, getProperty, getString, getStrings, getStringValue, getStringValues, getValue, has, hasValue, keys, removeValue, setValuepublic boolean getBoolean(String name)
getBoolean in interface Inputpublic boolean getBooleanValue(String name)
InputgetBooleanValue in interface Inputname - the parameter's namepublic boolean getBoolean(String name, boolean def)
getBoolean in interface Inputpublic boolean getBooleanValue(String name, boolean def)
InputgetBooleanValue in interface Inputname - the parameter's namedef - default value to returnpublic Date getDate(String name)
Inputpublic Date getDate(String name, int style)
Inputpublic Date getDate(String name, String pattern)
Inputprotected abstract Locale getLocale()
public double getDouble(String name)
public double getDoubleValue(String name)
InputgetDoubleValue in interface Inputname - the parameter's namepublic double getDouble(String name, double def)
public double getDoubleValue(String name, double def)
InputgetDoubleValue in interface Inputname - the parameter's namedef - default value to returnpublic float getFloat(String name)
public 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 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 int[] getIntValues(String name)
InputgetIntValues in interface Inputname - the parameters'namepublic long getLong(String name)
public long[] getLongs(String name)
Inputpublic long getLongValue(String name)
InputgetLongValue in interface Inputname - the parameter's namepublic long getLongValue(String name, long def)
InputgetLongValue in interface Inputname - the parameter's namedef - default value to returnpublic <E> E getObject(Class<? extends E> klass)
Inputpublic <E> E getObject(Class<? extends E> klass, boolean convertBoolean)
public <E> E getObject(Class<? extends E> klass, String prefix)
Inputpublic void inject(Object bean)
Inputpublic <E> E getObject(E bean,
boolean convertBoolean)
public void inject(Object bean, String prefix)
Inputpublic <E> E getObject(E bean,
String prefix,
boolean convertBoolean)
public <E> E getObject(E target,
String prefix,
boolean tryField,
boolean tryToConvert,
boolean convertBoolean)
public <E extends Enum<E>> E getEnum(String key, Class<E> enumClass)
Inputpublic <E extends Enum<E>> Set<E> getEnums(String key, Class<E> enumClass)
Inputpublic static boolean isB()
public static void main(String[] args)
Copyright © 2015. All Rights Reserved.