ArrayConverter
implementation@Deprecated public final class ShortArrayConverter extends AbstractArrayConverter
Standard Converter
implementation that converts an incoming
String into a primitive array of short. On a conversion failure, returns
a specified default value or throws a ConversionException
depending
on how this instance is constructed.
Modifier and Type | Field and Description |
---|---|
private static short[] |
MODEL
Deprecated.
Model object for type comparisons.
|
defaultValue, NO_DEFAULT, strings, useDefault
Constructor and Description |
---|
ShortArrayConverter()
Deprecated.
Create a
Converter that will throw
a ConversionException if a conversion error occurs. |
ShortArrayConverter(java.lang.Object defaultValue)
Deprecated.
Create a
Converter that will return
the specified default value if a conversion error occurs. |
Modifier and Type | Method and Description |
---|---|
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.
|
parseElements
private static final short[] MODEL
Model object for type comparisons.
public ShortArrayConverter()
Converter
that will throw
a ConversionException
if a conversion error occurs.public ShortArrayConverter(java.lang.Object defaultValue)
Converter
that will return
the specified default value if a conversion error occurs.defaultValue
- The default value to be returnedpublic java.lang.Object convert(java.lang.Class type, java.lang.Object value)
convert
in interface Converter
convert
in class AbstractArrayConverter
type
- Data type to which this value should be convertedvalue
- The input value to be convertedConversionException
- if conversion cannot be performed
successfullyCopyright (c) 2000-2008 - Apache Software Foundation