Class FloatField

java.lang.Object
org.apache.fulcrum.intake.model.Field<Float>
org.apache.fulcrum.intake.model.FloatField
All Implemented Interfaces:
Serializable, org.apache.avalon.framework.logger.LogEnabled

public class FloatField extends Field<Float>
Processor for float fields.
Version:
$Id$
Author:
Thomas Vandahl
See Also:
  • Constructor Details

    • FloatField

      public FloatField(XmlField field, Group group) throws IntakeException
      Constructor.
      Parameters:
      field - xml field definition object
      group - xml group definition object
      Throws:
      IntakeException - thrown by superclass
  • Method Details

    • setDefaultValue

      public void setDefaultValue(String prop)
      Sets the default value for an Float Field
      Specified by:
      setDefaultValue in class Field<Float>
      Parameters:
      prop - Parameter for the default values
    • setEmptyValue

      public void setEmptyValue(String prop)
      Set the empty Value. This value is used if Intake maps a field to a parameter returned by the user and the corresponding field is either empty (empty string) or non-existent.
      Specified by:
      setEmptyValue in class Field<Float>
      Parameters:
      prop - The value to use if the field is empty.
    • getSafeEmptyValue

      protected Object getSafeEmptyValue()
      Provides access to emptyValue such that the value returned will be acceptable as an argument parameter to Method.invoke. Subclasses that deal with primitive types should ensure that they return an appropriate value wrapped in the object wrapper class for the primitive type.
      Overrides:
      getSafeEmptyValue in class Field<Float>
      Returns:
      the value to use when the field is empty or an Object that wraps the empty value for primitive types.
    • getDefaultValidator

      protected String getDefaultValidator()
      A suitable validator.
      Overrides:
      getDefaultValidator in class Field<Float>
      Returns:
      A suitable validator
    • doSetValue

      protected void doSetValue()
      Sets the value of the field from data in the parser.
      Specified by:
      doSetValue in class Field<Float>