org.apache.commons.beanutils.converters

Class FloatArrayConverter

public final class FloatArrayConverter extends AbstractArrayConverter

Deprecated: Replaced by the new ArrayConverter implementation

Standard Converter implementation that converts an incoming String into a primitive array of float. On a conversion failure, returns a specified default value or throws a ConversionException depending on how this instance is constructed.

Since: 1.4

Version: $Revision: 556229 $ $Date: 2007-07-14 07:11:19 +0100 (Sat, 14 Jul 2007) $

Author: Craig R. McClanahan

Constructor Summary
FloatArrayConverter()
Create a Converter that will throw a ConversionException if a conversion error occurs.
FloatArrayConverter(Object defaultValue)
Create a Converter that will return the specified default value if a conversion error occurs.
Method Summary
Objectconvert(Class type, Object value)
Convert the specified input object into an output object of the specified type.

Constructor Detail

FloatArrayConverter

public FloatArrayConverter()
Create a Converter that will throw a ConversionException if a conversion error occurs.

FloatArrayConverter

public FloatArrayConverter(Object defaultValue)
Create a Converter that will return the specified default value if a conversion error occurs.

Parameters: defaultValue The default value to be returned

Method Detail

convert

public Object convert(Class type, Object value)
Convert the specified input object into an output object of the specified type.

Parameters: type Data type to which this value should be converted value The input value to be converted

Returns: the converted value

Throws: ConversionException if conversion cannot be performed successfully

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.