Class ShortArrayConverter
- java.lang.Object
-
- org.apache.commons.beanutils.converters.AbstractArrayConverter
-
- org.apache.commons.beanutils.converters.ShortArrayConverter
-
- All Implemented Interfaces:
Converter
@Deprecated public final class ShortArrayConverter extends AbstractArrayConverter
Deprecated.Replaced by the newArrayConverterimplementationStandard
Converterimplementation that converts an incoming String into a primitive array of short. On a conversion failure, returns a specified default value or throws aConversionExceptiondepending on how this instance is constructed.- Since:
- 1.4
-
-
Field Summary
Fields Modifier and Type Field Description private static short[]MODELDeprecated.Model object for type comparisons.-
Fields inherited from class org.apache.commons.beanutils.converters.AbstractArrayConverter
defaultValue, NO_DEFAULT, strings, useDefault
-
-
Constructor Summary
Constructors Constructor Description ShortArrayConverter()Deprecated.Create aConverterthat will throw aConversionExceptionif a conversion error occurs.ShortArrayConverter(java.lang.Object defaultValue)Deprecated.Create aConverterthat will return the specified default value if a conversion error occurs.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Objectconvert(java.lang.Class type, java.lang.Object value)Deprecated.Convert the specified input object into an output object of the specified type.-
Methods inherited from class org.apache.commons.beanutils.converters.AbstractArrayConverter
parseElements
-
-
-
-
Constructor Detail
-
ShortArrayConverter
public ShortArrayConverter()
Deprecated.Create aConverterthat will throw aConversionExceptionif a conversion error occurs.
-
ShortArrayConverter
public ShortArrayConverter(java.lang.Object defaultValue)
Deprecated.Create aConverterthat will return the specified default value if a conversion error occurs.- Parameters:
defaultValue- The default value to be returned
-
-
Method Detail
-
convert
public java.lang.Object convert(java.lang.Class type, java.lang.Object value)Deprecated.Convert the specified input object into an output object of the specified type.- Specified by:
convertin interfaceConverter- Specified by:
convertin classAbstractArrayConverter- Parameters:
type- Data type to which this value should be convertedvalue- The input value to be converted- Returns:
- the converted value
- Throws:
ConversionException- if conversion cannot be performed successfully
-
-