com.atlassian.jira.webwork.parameters
Class FloatArrayConverter

java.lang.Object
  extended by com.atlassian.jira.webwork.parameters.FloatArrayConverter
All Implemented Interfaces:
ParameterConverter

public class FloatArrayConverter
extends Object

A implementation of ParameterConverter for Float[] objects

Introduced / changed as part of JRA-15664

Since:
v3.13.2

Constructor Summary
FloatArrayConverter()
           
 
Method Summary
protected  void checkPrimitiveInput(String parameterValue, Class paramType, String bundleKey)
          Throws a PropertyEditorException just like webwork1 when a value is a primitive AND the string is empty
 Object convertParameter(String[] parameterValues, Class paramType)
          This is called to perform the conversion.
protected  boolean isEmpty(String parameterValue)
          The same test that webwork1 uses for null-able Longs/Integers/Shorts/Bytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatArrayConverter

public FloatArrayConverter()
Method Detail

convertParameter

public Object convertParameter(String[] parameterValues,
                               Class paramType)
                        throws IllegalArgumentException
Description copied from interface: ParameterConverter
This is called to perform the conversion. The parameterValues will always be a String[] of length 1 or more. It can never be null.

Parameters:
parameterValues - a String[] that is never null and at least length 1 or more.
paramType - the type of the target object
Returns:
a converted object of the right type
Throws:
IllegalArgumentException - if the value cant be converted

isEmpty

protected boolean isEmpty(String parameterValue)
The same test that webwork1 uses for null-able Longs/Integers/Shorts/Bytes

Parameters:
parameterValue - the parameter value
Returns:
true if its an empty string

checkPrimitiveInput

protected void checkPrimitiveInput(String parameterValue,
                                   Class paramType,
                                   String bundleKey)
Throws a PropertyEditorException just like webwork1 when a value is a primitive AND the string is empty

Parameters:
parameterValue - the value in play
paramType - the type of parameter
bundleKey - the webwork1 bundle key to use


Copyright © 2002-2014 Atlassian. All Rights Reserved.