Package: org.codehaus.groovy.grails.validation

## [Java] Class ScaleConstraint

- org.codehaus.groovy.grails.validation.ScaleConstraint

- Manages the scale for floating point numbers (i.e., the number of digits to the right of the decimal point). Supports properties of the following types:

  - java.lang.Float
  - java.lang.Double
  - java.math.BigDecimal (and its subclasses)
  When applied, determines if the number includes more nonzero decimal places than the scale permits. If so, it rounds the number to the maximum number of decimal places allowed by the scale. The rounding behavior described above occurs automatically when the constraint is applied. This constraint does not generate validation errors.
  Authors:
    Jason Rudolph
  Since:
    0.4

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractConstraint` | `classShortName, constraintOwningClass, constraintParameter, constraintPropertyName, messageSource`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `java.lang.String` | `getName()`
    `int` | `getScale()` @return the scale
    `protected void` | `processValidate(java.lang.Object target, java.lang.Object propertyValue, org.springframework.validation.Errors errors)` {@inheritDoc}
    `void` | `setParameter(java.lang.Object constraintParameter)`
    `boolean` | `supports(java.lang.Class type)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractConstraint` | `checkState, getDefaultMessage, getParameter, getPropertyName, isValid, processValidate, rejectValue, rejectValue, rejectValue, rejectValue, rejectValue, rejectValueWithDefaultMessage, setMessageSource, setOwningClass, setParameter, setPropertyName, skipBlankValues, skipNullValues, toString, validate`
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Method Detail

    - #### public java.lang.String getName()

    - #### public int getScale()

      Returns:
        the scale

    - #### @java.lang.Override protected void processValidate(java.lang.Object target, java.lang.Object propertyValue, org.springframework.validation.Errors errors)

      {@inheritDoc}

      See Also:
        AbstractConstraint.processValidate

    - #### @java.lang.Override public void setParameter(java.lang.Object constraintParameter)

    - #### @java.lang.SuppressWarnings("rawtypes") public boolean supports(java.lang.Class type)