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 thetrue
boolean value.static final boolean
The default boolean value is false.static final boolean[]
The default boolean array value is an empty boolean array.static final byte
The 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 double
The default double value is 0.0.static final double[]
The default double array value is an empty double array.static final float
The default float value is 0.0f.static final float[]
The default float array value is an empty float array.static final int
The default integer value is 0.static final int[]
The default integer array value is an empty integer array.static final long
The default long value is 0L.static final long[]
The default long array value is an empty long array.static final Number
The default Number value is0
.static final Number[]
The default Number array value is an empty Number array.static final Number
The default Object value isnull
.static final short
The default short value is 0.static final short[]
The default short array value is an empty short array.static final String
The 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 boolean
Returns the Object value as a boolean.static double
Returns the Object value as a double.static float
Returns the Object value as a float.static int
Returns the Object value as an integer.static long
Returns the Object value as a long.static short
Returns the Object value as a short.static Number
Returns the Object value as a Number.static String
Returns the Object value as a String.static Date
get
(Object value, DateFormat dateFormat, Date defaultValue) Returns the Object value as a Date.static boolean
Returns the String value as a boolean.static double
Returns the String value as a double.static double
Returns the String value as a double.static float
Returns the String value as a float.static int
Returns the String value as an integer.static long
Returns the String value as a long.static short
Returns the String value as a short.static String
Returns the String value as a String.static Date
get
(String value, DateFormat dateFormat, Date defaultValue) Returns the String value as a Date.static boolean
getBoolean
(Object value) Returns the Object value as a boolean.static boolean
getBoolean
(Object value, boolean defaultValue) Returns the Object value as a boolean.static boolean
getBoolean
(String value) Returns the String value as a boolean.static boolean
getBoolean
(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 Date
getDate
(Object value, DateFormat dateFormat) Returns the Object value as a Date.static Date
getDate
(Object value, DateFormat dateFormat, Date defaultValue) Returns the Object value as a Date.static Date
getDate
(String value, DateFormat dateFormat) Returns the String value as a Date.static Date
getDate
(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 double
Returns the Object value as a double.static double
Returns the Object value as a double.static double
Returns the String value as a double.static double
Returns the String value as a double.static double
Returns 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 float
Returns the Object value as a float.static float
Returns the Object value as a float.static float
Returns the String value as a float.static float
Returns 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 int
getInteger
(Object value) Returns the Object value as an integer.static int
getInteger
(Object value, int defaultValue) Returns the Object value as an integer.static int
getInteger
(String value) Returns the String value as an integer.static int
getInteger
(String value, int defaultValue) Returns the String value as an integer.static int
getIntegerStrict
(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 long
Returns the Object value as a long.static long
Returns the Object value as a long.static long
Returns the String value as a long.static long
Returns the String value as a long.static long
getLongStrict
(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 Number
Returns the Object value as a Number.static Number
Returns the Object value as a Number.static Number
Returns the String value as a Number.static Number
Returns 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 Object
Returns the Object value.static Object
Returns the Object value.static short
Returns the Object value as a short.static short
Returns the Object value as a short.static short
Returns the String value as a short.static short
Returns the String value as a short.static short
getShortStrict
(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 String
Returns the Object value as a String.static String
Returns the Object value as a String.static String
Returns the String value.static String
Returns 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 thetrue
boolean 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 aBOOLEANS
value,false
is 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 aBOOLEANS
value,false
is 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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_BOOLEAN
is returned. If the value does not match aBOOLEANS
value,false
is 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 aBOOLEANS
value,false
is 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_BOOLEAN
is returned. If the value does not match aBOOLEANS
value,false
is 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 aBOOLEANS
value,false
is 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_VALUES
array is returned. In the returned array, each value element that isnull
is replaced by theDEFAULT_BOOLEAN
, and each value element that does not match aBOOLEANS
value 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 isnull
is replaced by a default value, and each value element that does not match aBOOLEANS
value 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_VALUES
array is returned. In the returned array, each value element that isnull
is replaced by theDEFAULT_BOOLEAN
, and each value element that does not match aBOOLEANS
value 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 isnull
is replaced by a default value, and each value element that does not match aBOOLEANS
value 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 isnull
or 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 isnull
or 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 isnull
or 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 isnull
or 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_VALUES
array 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_VALUES
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 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 isnull
or not convertible to a double, theDEFAULT_DOUBLE
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a double
-
getDouble
Returns the Object value as a double. If the value isnull
or 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 isnull
or not convertible to a double, theDEFAULT_DOUBLE
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a double
-
getDouble
Returns the String value as a double. If the value isnull
or 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 isnull
or not convertible to a double, theDEFAULT_DOUBLE
is 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 isnull
or not convertible to a float, theDEFAULT_FLOAT
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a float
-
getFloat
Returns the Object value as a float. If the value isnull
or 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 isnull
or not convertible to a float, theDEFAULT_FLOAT
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a float
-
getFloat
Returns the String value as a float. If the value isnull
or 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_VALUES
array 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_VALUES
array 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_VALUES
array 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 isnull
or not convertible to an integer, theDEFAULT_INTEGER
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as an integer
-
getInteger
Returns the Object value as an integer. If the value isnull
or 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 isnull
or not convertible to an integer, theDEFAULT_INTEGER
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as an integer
-
getInteger
Returns the String value as an integer. If the value isnull
or 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, aNumberFormatException
is 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_VALUES
array 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_VALUES
array 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 isnull
or not convertible to a long, theDEFAULT_LONG
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a long
-
getLong
Returns the Object value as a long. If the value isnull
or 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 isnull
or not convertible to a long, theDEFAULT_LONG
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a long
-
getLong
Returns the String value as a long. If the value isnull
or 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, aNumberFormatException
is 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_VALUES
array 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_VALUES
array 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 isnull
or not convertible to a Number, theDEFAULT_NUMBER
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a Number
-
getNumber
Returns the Object value as a Number. If the value isnull
or 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 isnull
or not convertible to a Number, theDEFAULT_NUMBER
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a Number
-
getNumber
Returns the String value as a Number. If the value isnull
or 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_VALUES
array 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_VALUES
array 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_OBJECT
is 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 isnull
or not convertible to a short, theDEFAULT_SHORT
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a short
-
getShort
Returns the Object value as a short. If the value isnull
or 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 isnull
or not convertible to a short, theDEFAULT_SHORT
is returned.- Parameters:
value
- the value to convert- Returns:
- the value as a short
-
getShort
Returns the String value as a short. If the value isnull
or 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, aNumberFormatException
is 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_VALUES
array 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_VALUES
array 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_STRING
is 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_STRING
is 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_VALUES
array 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
-