Package com.liferay.portal.kernel.util
Class GetterUtil
Object
com.liferay.portal.kernel.util.GetterUtil
Provides utility methods for reading values as various types.
- Author:
- Brian Wing Shun Chan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]The String values that can be converted to thetrueboolean value.static final booleanThe default boolean value is false.static final boolean[]The default boolean array value is an empty boolean array.static final byteThe default byte value is 0x0.static final byte[]The default byte array value is an empty byte array.static final Date[]The default Date array value is an empty Date array.static final doubleThe default double value is 0.0.static final double[]The default double array value is an empty double array.static final floatThe default float value is 0.0f.static final float[]The default float array value is an empty float array.static final intThe default integer value is 0.static final int[]The default integer array value is an empty integer array.static final longThe default long value is 0L.static final long[]The default long array value is an empty long array.static final NumberThe default Number value is0.static final Number[]The default Number array value is an empty Number array.static final NumberThe default Object value isnull.static final shortThe default short value is 0.static final short[]The default short array value is an empty short array.static final StringThe default String value is "".static final String[]The default String array value is an empty String array. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns the Object value as a boolean.static doubleReturns the Object value as a double.static floatReturns the Object value as a float.static intReturns the Object value as an integer.static longReturns the Object value as a long.static shortReturns the Object value as a short.static NumberReturns the Object value as a Number.static StringReturns the Object value as a String.static Dateget(Object value, DateFormat dateFormat, Date defaultValue) Returns the Object value as a Date.static booleanReturns the String value as a boolean.static doubleReturns the String value as a double.static doubleReturns the String value as a double.static floatReturns the String value as a float.static intReturns the String value as an integer.static longReturns the String value as a long.static shortReturns the String value as a short.static StringReturns the String value as a String.static Dateget(String value, DateFormat dateFormat, Date defaultValue) Returns the String value as a Date.static booleangetBoolean(Object value) Returns the Object value as a boolean.static booleangetBoolean(Object value, boolean defaultValue) Returns the Object value as a boolean.static booleangetBoolean(String value) Returns the String value as a boolean.static booleangetBoolean(String value, boolean defaultValue) Returns the String value as a boolean.static boolean[]getBooleanValues(Object value) Returns the Object value as a boolean array.static boolean[]getBooleanValues(Object value, boolean[] defaultValue) Returns the Object value as a boolean array.static boolean[]getBooleanValues(String[] values) Returns the String values as a boolean array.static boolean[]getBooleanValues(String[] values, boolean[] defaultValue) Returns the String values as a boolean array.static DategetDate(Object value, DateFormat dateFormat) Returns the Object value as a Date.static DategetDate(Object value, DateFormat dateFormat, Date defaultValue) Returns the Object value as a Date.static DategetDate(String value, DateFormat dateFormat) Returns the String value as a Date.static DategetDate(String value, DateFormat dateFormat, Date defaultValue) Returns the String value as a Date.static Date[]getDateValues(Object value, DateFormat dateFormat) Returns the Object value as a Date array.static Date[]getDateValues(Object value, DateFormat dateFormat, Date[] defaultValue) Returns the Object value as a Date array.static Date[]getDateValues(String[] values, DateFormat dateFormat) Returns the String value as a Date array.static Date[]getDateValues(String[] values, DateFormat dateFormat, Date[] defaultValue) Returns the String value as a Date array.static doubleReturns the Object value as a double.static doubleReturns the Object value as a double.static doubleReturns the String value as a double.static doubleReturns the String value as a double.static doubleReturns the String value as a double.static double[]getDoubleValues(Object value) Returns the Object value as a double array.static double[]getDoubleValues(Object value, double[] defaultValue) Returns the Object values as a double array.static double[]getDoubleValues(String[] values) Returns the String values as a double array.static double[]getDoubleValues(String[] values, double[] defaultValue) Returns the String values as a double array.static floatReturns the Object value as a float.static floatReturns the Object value as a float.static floatReturns the String value as a float.static floatReturns the String value as a float.static float[]getFloatValues(Object value) Returns the Object value as a float array.static float[]getFloatValues(Object value, float[] defaultValue) Returns the Object value as a float array.static float[]getFloatValues(String[] values) Returns the String values as a float array.static float[]getFloatValues(String[] values, float[] defaultValue) Returns the String values as a float array.static intgetInteger(Object value) Returns the Object value as an integer.static intgetInteger(Object value, int defaultValue) Returns the Object value as an integer.static intgetInteger(String value) Returns the String value as an integer.static intgetInteger(String value, int defaultValue) Returns the String value as an integer.static intgetIntegerStrict(String value) Returns the String value as an integer.static int[]getIntegerValues(Object value) Returns the Object value as an integer array.static int[]getIntegerValues(Object value, int[] defaultValue) Returns the Object value as an integer array.static int[]getIntegerValues(String[] values) Returns the String array values as an integer array.static int[]getIntegerValues(String[] values, int[] defaultValue) Returns the String array values as an integer array.static longReturns the Object value as a long.static longReturns the Object value as a long.static longReturns the String value as a long.static longReturns the String value as a long.static longgetLongStrict(String value) Returns the String value as a long.static long[]getLongValues(Object value) Returns the Object value as a long array.static long[]getLongValues(Object value, long[] defaultValue) Returns the Object value as a long array.static long[]getLongValues(String[] values) Returns the String array values as a long array.static long[]getLongValues(String[] values, long[] defaultValue) Returns the String array values as a long array.static NumberReturns the Object value as a Number.static NumberReturns the Object value as a Number.static NumberReturns the String value as a Number.static NumberReturns the String value as a Number.static Number[]getNumberValues(Object value) Returns the Object value as a Number array.static Number[]getNumberValues(Object value, Number[] defaultValue) Returns the Object value as a Number array.static Number[]getNumberValues(String[] values) Returns the String array values as a Number array.static Number[]getNumberValues(String[] values, Number[] defaultValue) Returns the String array values as a Number array.static ObjectReturns the Object value.static ObjectReturns the Object value.static shortReturns the Object value as a short.static shortReturns the Object value as a short.static shortReturns the String value as a short.static shortReturns the String value as a short.static shortgetShortStrict(String value) Returns the String value as a short.static short[]getShortValues(Object value) Returns the Object value as a short array.static short[]getShortValues(Object value, short[] defaultValue) Returns the Object value as a short array.static short[]getShortValues(String[] values) Returns the String array values as a short array.static short[]getShortValues(String[] values, short[] defaultValue) Returns the String array values as a short array.static StringReturns the Object value as a String.static StringReturns the Object value as a String.static StringReturns the String value.static StringReturns the String value.static String[]getStringValues(Object value) Returns the Object value as a String array.static String[]getStringValues(Object[] values, String[] defaultValue) Returns the String array values as a String array.static String[]getStringValues(Object[] values, Supplier<String[]> defaultValueSupplier) static String[]getStringValues(Object value, String[] defaultValue) Returns the Object value as a String array.static String[]getStringValues(Object value, Supplier<String[]> defaultValueSupplier) static String[]getStringValues(String[] values) Returns the String array values as a String array.
-
Field Details
-
BOOLEANS
The String values that can be converted to thetrueboolean value. -
DEFAULT_BOOLEAN
public static final boolean DEFAULT_BOOLEANThe default boolean value is false.- See Also:
-
DEFAULT_BOOLEAN_VALUES
public static final boolean[] DEFAULT_BOOLEAN_VALUESThe default boolean array value is an empty boolean array. -
DEFAULT_BYTE
public static final byte DEFAULT_BYTEThe default byte value is 0x0.- See Also:
-
DEFAULT_BYTE_VALUES
public static final byte[] DEFAULT_BYTE_VALUESThe default byte array value is an empty byte array. -
DEFAULT_DATE_VALUES
The default Date array value is an empty Date array. -
DEFAULT_DOUBLE
public static final double DEFAULT_DOUBLEThe default double value is 0.0.- See Also:
-
DEFAULT_DOUBLE_VALUES
public static final double[] DEFAULT_DOUBLE_VALUESThe default double array value is an empty double array. -
DEFAULT_FLOAT
public static final float DEFAULT_FLOATThe default float value is 0.0f.- See Also:
-
DEFAULT_FLOAT_VALUES
public static final float[] DEFAULT_FLOAT_VALUESThe default float array value is an empty float array. -
DEFAULT_INTEGER
public static final int DEFAULT_INTEGERThe default integer value is 0.- See Also:
-
DEFAULT_INTEGER_VALUES
public static final int[] DEFAULT_INTEGER_VALUESThe default integer array value is an empty integer array. -
DEFAULT_LONG
public static final long DEFAULT_LONGThe default long value is 0L.- See Also:
-
DEFAULT_LONG_VALUES
public static final long[] DEFAULT_LONG_VALUESThe default long array value is an empty long array. -
DEFAULT_NUMBER
The default Number value is0. -
DEFAULT_NUMBER_VALUES
The default Number array value is an empty Number array. -
DEFAULT_OBJECT
The default Object value isnull. -
DEFAULT_SHORT
public static final short DEFAULT_SHORTThe default short value is 0.- See Also:
-
DEFAULT_SHORT_VALUES
public static final short[] DEFAULT_SHORT_VALUESThe default short array value is an empty short array. -
DEFAULT_STRING
The default String value is "".- See Also:
-
DEFAULT_STRING_VALUES
The default String array value is an empty String array.
-
-
Constructor Details
-
GetterUtil
public GetterUtil()
-
-
Method Details
-
get
Returns the Object value as a boolean. If the value isnull, the default value is returned. If the value does not match aBOOLEANSvalue,falseis returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a boolean
-
get
Returns the Object value as a Date. If the value isnullor not convertible to a Date, the default value is returned.- Parameters:
value- the value to convertdateFormat- the format used to parse the datedefaultValue- a default value- Returns:
- the value as a Date
-
get
Returns the Object value as a double. If the value isnullor not convertible to a double, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a double
-
get
Returns the Object value as a float. If the value isnullor not convertible to a float, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a float
-
get
Returns the Object value as an integer. If the value isnullor not convertible to an integer, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as an integer
-
get
Returns the Object value as a long. If the value isnullor not convertible to a long, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a long
-
get
Returns the Object value as a Number. If the value isnullor not convertible to a Number, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a Number
-
get
Returns the Object value as a short. If the value isnullor not convertible to a short, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a short
-
get
Returns the Object value as a String. If the value isnullor not convertible to a String, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a String
-
get
Returns the String value as a boolean. If the value isnull, the default value is returned. If the value does not match aBOOLEANSvalue,falseis returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a boolean
-
get
Returns the String value as a Date. If the value isnullor not convertible to a Date, the default value is returned.- Parameters:
value- the value to convertdateFormat- the format used to parse the datedefaultValue- a default value- Returns:
- the value as a Date
-
get
Returns the String value as a double. If the value isnullor not convertible to a double, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a double
-
get
Returns the String value as a double. If the value isnullor not convertible to a double, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default valuelocale- the locale used to parse the double value- Returns:
- the value as a double
-
get
Returns the String value as a float. If the value isnullor not convertible to a float, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a float
-
get
Returns the String value as an integer. If the value isnullor not convertible to an integer, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as an integer
-
get
Returns the String value as a long. If the value isnullor not convertible to a long, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a long
-
get
Returns the String value as a short. If the value isnullor not convertible to a short, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a short
-
get
Returns the String value as a String. If the value isnullor not convertible to a String, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a String
-
getBoolean
Returns the Object value as a boolean. If the value isnull, theDEFAULT_BOOLEANis returned. If the value does not match aBOOLEANSvalue,falseis returned.- Parameters:
value- the value to convert- Returns:
- the value as a boolean
-
getBoolean
Returns the Object value as a boolean. If the value isnull, the default value is returned. If the value does not match aBOOLEANSvalue,falseis returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a boolean
-
getBoolean
Returns the String value as a boolean. If the value isnull, theDEFAULT_BOOLEANis returned. If the value does not match aBOOLEANSvalue,falseis returned.- Parameters:
value- the value to convert- Returns:
- the value as a boolean
-
getBoolean
Returns the String value as a boolean. If the value isnull, the default value is returned. If the value does not match aBOOLEANSvalue,falseis returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a boolean
-
getBooleanValues
Returns the Object value as a boolean array. If the value isnull, theDEFAULT_BOOLEAN_VALUESarray is returned. In the returned array, each value element that isnullis replaced by theDEFAULT_BOOLEAN, and each value element that does not match aBOOLEANSvalue is replaced withfalse.- Parameters:
value- the value to convert- Returns:
- the value as a boolean array
-
getBooleanValues
Returns the Object value as a boolean array. If the value isnull, the default value is returned. In the returned array, each value element that isnullis replaced by a default value, and each value element that does not match aBOOLEANSvalue is replaced withfalse.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a boolean array
-
getBooleanValues
Returns the String values as a boolean array. If the values array isnull, theDEFAULT_BOOLEAN_VALUESarray is returned. In the returned array, each value element that isnullis replaced by theDEFAULT_BOOLEAN, and each value element that does not match aBOOLEANSvalue is replaced withfalse.- Parameters:
values- the values to convert- Returns:
- the values as a boolean array
-
getBooleanValues
Returns the String values as a boolean array. If the values array isnull, the default value is returned. In the returned array, each value element that isnullis replaced by a default value, and each value element that does not match aBOOLEANSvalue is replaced withfalse.- Parameters:
values- the values to convertdefaultValue- a default value- Returns:
- the values as a boolean array
-
getDate
Returns the Object value as a Date. If the value isnullor not convertible to a Date, the current date is returned.- Parameters:
value- the value to convertdateFormat- the format used to parse the date- Returns:
- the value as a Date
-
getDate
Returns the Object value as a Date. If the value isnullor not convertible to a Date, the default value is returned.- Parameters:
value- the value to convertdateFormat- the format used to parse the datedefaultValue- a default value- Returns:
- the value as a Date
-
getDate
Returns the String value as a Date. If the value isnullor not convertible to a Date, the current date is returned.- Parameters:
value- the value to convertdateFormat- the format used to parse the date- Returns:
- the value as a Date
-
getDate
Returns the String value as a Date. If the value isnullor not convertible to a Date, the default value is returned.- Parameters:
value- the value to convertdateFormat- the format used to parse the datedefaultValue- a default value- Returns:
- the value as a Date
-
getDateValues
Returns the Object value as a Date array. If the value isnull, theDEFAULT_DATE_VALUESarray is returned. In the returned array, each value element not convertible to a Date is replaced by the current date.- Parameters:
value- the value to convertdateFormat- the format used to parse the date- Returns:
- the value as a Date array
-
getDateValues
Returns the Object value as a Date array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to a Date is replaced by the current date.- Parameters:
value- the value to convertdateFormat- the format used to parse the datedefaultValue- a default value- Returns:
- the value as a Date array
-
getDateValues
Returns the String value as a Date array. If the values array isnull, theDEFAULT_DATE_VALUESis returned. In the returned array, each value element not convertible to a Date is replaced by the current date.- Parameters:
values- the values to convertdateFormat- the format used to parse the date- Returns:
- the values as a Date array
-
getDateValues
Returns the String value as a Date array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to a Date is replaced by the current date.- Parameters:
values- the values to convertdateFormat- the format used to parse the datedefaultValue- a default value- Returns:
- the values as a Date array
-
getDouble
Returns the Object value as a double. If the value isnullor not convertible to a double, theDEFAULT_DOUBLEis returned.- Parameters:
value- the value to convert- Returns:
- the value as a double
-
getDouble
Returns the Object value as a double. If the value isnullor not convertible to a double, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a double
-
getDouble
Returns the String value as a double. If the value isnullor not convertible to a double, theDEFAULT_DOUBLEis returned.- Parameters:
value- the value to convert- Returns:
- the value as a double
-
getDouble
Returns the String value as a double. If the value isnullor not convertible to a double, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a double
-
getDouble
Returns the String value as a double. If the value isnullor not convertible to a double, theDEFAULT_DOUBLEis returned.- Parameters:
value- the value to convertlocale- the locale used to parse the double value- Returns:
- the value as a double
-
getDoubleValues
Returns the Object value as a double array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to a double is replaced by theDEFAULT_DOUBLE.- Parameters:
value- the value to convert- Returns:
- the value as a double array
-
getDoubleValues
Returns the Object values as a double array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to a double is replaced by theDEFAULT_DOUBLE.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a double array
-
getDoubleValues
Returns the String values as a double array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to a double is replaced by theDEFAULT_DOUBLE.- Parameters:
values- the values to convert- Returns:
- the values as a double array
-
getDoubleValues
Returns the String values as a double array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to a double is replaced by the default value.- Parameters:
values- the values to convertdefaultValue- a default value- Returns:
- the values as a double array
-
getFloat
Returns the Object value as a float. If the value isnullor not convertible to a float, theDEFAULT_FLOATis returned.- Parameters:
value- the value to convert- Returns:
- the value as a float
-
getFloat
Returns the Object value as a float. If the value isnullor not convertible to a float, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a float
-
getFloat
Returns the String value as a float. If the value isnullor not convertible to a float, theDEFAULT_FLOATis returned.- Parameters:
value- the value to convert- Returns:
- the value as a float
-
getFloat
Returns the String value as a float. If the value isnullor not convertible to a float, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a float
-
getFloatValues
Returns the Object value as a float array. If the value isnull, theDEFAULT_FLOAT_VALUESarray is returned. In the returned array, each value element not convertible to a float is replaced by theDEFAULT_FLOAT.- Parameters:
value- the value to convert- Returns:
- the value as a float array
-
getFloatValues
Returns the Object value as a float array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to a float is replaced by theDEFAULT_FLOAT.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a float array
-
getFloatValues
Returns the String values as a float array. If the values array isnull, theDEFAULT_FLOAT_VALUESarray is returned. In the returned array, each value element not convertible to a float is replaced by theDEFAULT_FLOAT.- Parameters:
values- the values to convert- Returns:
- the values as a float array
-
getFloatValues
Returns the String values as a float array. If the values array isnull, theDEFAULT_FLOAT_VALUESarray is returned. In the returned array, each value element not convertible to a float is replaced by the default value.- Parameters:
values- the values to convertdefaultValue- a default value- Returns:
- the values as a float array
-
getInteger
Returns the Object value as an integer. If the value isnullor not convertible to an integer, theDEFAULT_INTEGERis returned.- Parameters:
value- the value to convert- Returns:
- the value as an integer
-
getInteger
Returns the Object value as an integer. If the value isnullor not convertible to an integer, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as an integer
-
getInteger
Returns the String value as an integer. If the value isnullor not convertible to an integer, theDEFAULT_INTEGERis returned.- Parameters:
value- the value to convert- Returns:
- the value as an integer
-
getInteger
Returns the String value as an integer. If the value isnullor not convertible to an integer, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as an integer
-
getIntegerStrict
Returns the String value as an integer. If the value is not convertible to an integer, aNumberFormatExceptionis thrown.- Parameters:
value- the value to convert- Returns:
- the value as an integer
-
getIntegerValues
Returns the Object value as an integer array. If the value isnull, theDEFAULT_INTEGER_VALUESarray is returned. In the returned array, each value element not convertible to an integer is replaced by theDEFAULT_INTEGER.- Parameters:
value- the value to convert- Returns:
- the value as an integer array
-
getIntegerValues
Returns the Object value as an integer array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to an integer is replaced by theDEFAULT_INTEGER.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as an integer array
-
getIntegerValues
Returns the String array values as an integer array. If the values array isnull, theDEFAULT_INTEGER_VALUESarray is returned. In the returned array, each value element not convertible to an integer is replaced by theDEFAULT_INTEGER.- Parameters:
values- the values to convert- Returns:
- the values as an integer array
-
getIntegerValues
Returns the String array values as an integer array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to an integer is replaced by theDEFAULT_INTEGER.- Parameters:
values- the values to convertdefaultValue- a default value- Returns:
- the values as an integer array
-
getLong
Returns the Object value as a long. If the value isnullor not convertible to a long, theDEFAULT_LONGis returned.- Parameters:
value- the value to convert- Returns:
- the value as a long
-
getLong
Returns the Object value as a long. If the value isnullor not convertible to a long, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a long
-
getLong
Returns the String value as a long. If the value isnullor not convertible to a long, theDEFAULT_LONGis returned.- Parameters:
value- the value to convert- Returns:
- the value as a long
-
getLong
Returns the String value as a long. If the value isnullor not convertible to a long, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a long
-
getLongStrict
Returns the String value as a long. If the value is not convertible to a long, aNumberFormatExceptionis thrown.- Parameters:
value- the value to convert- Returns:
- the value as an long
-
getLongValues
Returns the Object value as a long array. If the value isnull, theDEFAULT_LONG_VALUESarray is returned. In the returned array, each value element not convertible to a long is replaced by theDEFAULT_LONG.- Parameters:
value- the value to convert- Returns:
- the value as a long array
-
getLongValues
Returns the Object value as a long array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to a long is replaced by theDEFAULT_LONG.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a long array
-
getLongValues
Returns the String array values as a long array. If the values array isnull, theDEFAULT_LONG_VALUESarray is returned. In the returned array, each value element not convertible to a long is replaced by theDEFAULT_LONG.- Parameters:
values- the values to convert- Returns:
- the values as a long array
-
getLongValues
Returns the String array values as a long array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to a long is replaced by theDEFAULT_LONG.- Parameters:
values- the values to convertdefaultValue- a default value- Returns:
- the values as a long array
-
getNumber
Returns the Object value as a Number. If the value isnullor not convertible to a Number, theDEFAULT_NUMBERis returned.- Parameters:
value- the value to convert- Returns:
- the value as a Number
-
getNumber
Returns the Object value as a Number. If the value isnullor not convertible to a Number, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a Number
-
getNumber
Returns the String value as a Number. If the value isnullor not convertible to a Number, theDEFAULT_NUMBERis returned.- Parameters:
value- the value to convert- Returns:
- the value as a Number
-
getNumber
Returns the String value as a Number. If the value isnullor not convertible to a Number, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a Number
-
getNumberValues
Returns the Object value as a Number array. If the value isnull, theDEFAULT_NUMBER_VALUESarray is returned. In the returned array, each value element not convertible to a Number is replaced by theDEFAULT_NUMBER.- Parameters:
value- the value to convert- Returns:
- the value as a Number array
-
getNumberValues
Returns the Object value as a Number array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to a Number is replaced by theDEFAULT_NUMBER.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a Number array
-
getNumberValues
Returns the String array values as a Number array. If the values array isnull, theDEFAULT_NUMBER_VALUESarray is returned. In the returned array, each value element not convertible to a Number is replaced by theDEFAULT_NUMBER.- Parameters:
values- the values to convert- Returns:
- the values as a Number array
-
getNumberValues
Returns the String array values as a Number array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to a Number is replaced by theDEFAULT_NUMBER.- Parameters:
values- the values to convertdefaultValue- a default value- Returns:
- the values as a Number array
-
getObject
Returns the Object value. If the value isnull, theDEFAULT_OBJECTis returned.- Parameters:
value- the value- Returns:
- the value
-
getObject
Returns the Object value. If the value isnull, the default value is returned.- Parameters:
value- the valuedefaultValue- a default value- Returns:
- the value
-
getShort
Returns the Object value as a short. If the value isnullor not convertible to a short, theDEFAULT_SHORTis returned.- Parameters:
value- the value to convert- Returns:
- the value as a short
-
getShort
Returns the Object value as a short. If the value isnullor not convertible to a short, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a short
-
getShort
Returns the String value as a short. If the value isnullor not convertible to a short, theDEFAULT_SHORTis returned.- Parameters:
value- the value to convert- Returns:
- the value as a short
-
getShort
Returns the String value as a short. If the value isnullor not convertible to a short, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a short
-
getShortStrict
Returns the String value as a short. If the value is not convertible to a short, aNumberFormatExceptionis thrown.- Parameters:
value- the value to convert- Returns:
- the value as a short
-
getShortValues
Returns the Object value as a short array. If the value isnull, theDEFAULT_SHORT_VALUESarray is returned. In the returned array, each value element not convertible to a short is replaced by theDEFAULT_SHORT.- Parameters:
value- the value to convert- Returns:
- the value as a short array
-
getShortValues
Returns the Object value as a short array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to a short is replaced by theDEFAULT_SHORT.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a short array
-
getShortValues
Returns the String array values as a short array. If the values array isnull, theDEFAULT_SHORT_VALUESarray is returned. In the returned array, each value element not convertible to a short is replaced by theDEFAULT_SHORT.- Parameters:
values- the values to convert- Returns:
- the values as a short array
-
getShortValues
Returns the String array values as a short array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to a short is replaced by theDEFAULT_SHORT.- Parameters:
values- the values to convertdefaultValue- a default value- Returns:
- the values as a short array
-
getString
Returns the Object value as a String. If the value isnull, theDEFAULT_STRINGis returned.- Parameters:
value- the value to convert- Returns:
- the value as a String
-
getString
Returns the Object value as a String. If the value isnull, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a String
-
getString
Returns the String value. If the value isnull, theDEFAULT_STRINGis returned.- Parameters:
value- the value- Returns:
- the value
-
getString
Returns the String value. If the value isnull, the default value is returned.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value
-
getStringValues
Returns the Object value as a String array. If the value isnull, theDEFAULT_STRING_VALUESarray is returned. In the returned array, each value element not convertible to a String is replaced by theDEFAULT_STRING.- Parameters:
value- the value to convert- Returns:
- the value as a String array
-
getStringValues
Returns the Object value as a String array. If the value isnull, the default value is returned. In the returned array, each value element not convertible to a String is replaced by theDEFAULT_STRING.- Parameters:
value- the value to convertdefaultValue- a default value- Returns:
- the value as a String array
-
getStringValues
-
getStringValues
Returns the String array values as a String array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to a String is replaced by theDEFAULT_STRING.- Parameters:
values- the values to convertdefaultValue- a default value- Returns:
- the values as a String array
-
getStringValues
-
getStringValues
Returns the String array values as a String array. If the values array isnull, the default value is returned. In the returned array, each value element not convertible to a String is replaced by theDEFAULT_STRING.- Parameters:
values- the values to convert- Returns:
- the values as a String array
-