/** * Returns the String values as a float array. If the values array is * <code>null</code>, the {@link #DEFAULT_FLOAT_VALUES} array is returned. * In the returned array, each value element not convertible to a float is * replaced by the {@link #DEFAULT_FLOAT}. * * @param values the values to convert * @return the values as a float array */ public static float[] getFloatValues(String[] values) { return getFloatValues(values, DEFAULT_FLOAT_VALUES); }
/** * Returns the Object value as a float array. If the value is * <code>null</code>, the {@link #DEFAULT_FLOAT_VALUES} array is returned. * In the returned array, each value element not convertible to a float is * replaced by the {@link #DEFAULT_FLOAT}. * * @param value the value to convert * @return the value as a float array */ public static float[] getFloatValues(Object value) { return getFloatValues(value, DEFAULT_FLOAT_VALUES); }
public float[] getFloatValues(java.lang.String[] values, float[] defaultValue) { return GetterUtil.getFloatValues(values, defaultValue); }
public float[] getFloatValues(java.lang.Object value, float[] defaultValue) { return GetterUtil.getFloatValues(value, defaultValue); }
public float[] getFloatValues(java.lang.Object value) { return GetterUtil.getFloatValues(value); }
public float[] getFloatValues(java.lang.String[] values) { return GetterUtil.getFloatValues(values); }
/** * Returns the Object value as a float array. If the value is * <code>null</code>, the default value is returned. In the returned array, * each value element not convertible to a float is replaced by the {@link * #DEFAULT_FLOAT}. * * @param value the value to convert * @param defaultValue a default value * @return the value as a float array */ public static float[] getFloatValues(Object value, float[] defaultValue) { if (value instanceof String[]) { return getFloatValues((String[])value, defaultValue); } if (value instanceof float[]) { return (float[])value; } return defaultValue; }
/** * Returns the request parameter value as a float array. In the returned * array, each parameter value not convertible to a float is replaced by the * default value. * * @param request the servlet request from which to read the parameter * @param param the name of the parameter * @param defaultValue a default value * @return the request parameter value as a float array */ public static float[] getFloatValues( HttpServletRequest request, String param, float[] defaultValue) { return GetterUtil.getFloatValues( getParameterValues(request, param, null), defaultValue); }
/** * Returns the portlet request parameter value as a float array. In the * returned array, each parameter value not convertible to a float is * replaced by the default value. * * @param portletRequest the portlet request from which to read the * parameter * @param param the name of the parameter * @param defaultValue a default value * @return the portlet request parameter value as a float array */ public static float[] getFloatValues( PortletRequest portletRequest, String param, float[] defaultValue) { return GetterUtil.getFloatValues( getParameterValues(portletRequest, param, null), defaultValue); }
/** * Returns the service context parameter value as a float array. In the * returned array, each parameter value not convertible to a float is * replaced by the default value. * * @param serviceContext the service context from which to read the * parameter * @param param the name of the parameter * @param defaultValue a default value * @return the service context parameter value as a float array */ public static float[] getFloatValues( ServiceContext serviceContext, String param, float[] defaultValue) { return GetterUtil.getFloatValues( serviceContext.getAttribute(param), defaultValue); }
public float[] getFloatValues(java.lang.String[] values, float[] defaultValue) { return GetterUtil.getFloatValues(values, defaultValue); }
public static float[] getFloatValues(String[] values) { return getFloatValues(values, DEFAULT_FLOAT_VALUES); }
public float[] getFloatValues(java.lang.String[] values) { return GetterUtil.getFloatValues(values); }
public static float[] getFloatValues( HttpServletRequest request, String param, float[] defaultValue) { return GetterUtil.getFloatValues( request.getParameterValues(param), defaultValue); }
public static float[] getFloatValues( PortletRequest portletRequest, String param, float[] defaultValue) { return GetterUtil.getFloatValues( portletRequest.getParameterValues(param), defaultValue); }
return GetterUtil.getFloatValues(attribute);
return GetterUtil.getFloatValues(StringUtil.split(attribute));