org.hibernate.validator.internal.constraintvalidators

## Class DigitsValidatorForNumber

- java.lang.Object
- - org.hibernate.validator.internal.constraintvalidators.DigitsValidatorForNumber

- All Implemented Interfaces:
    ConstraintValidator<Digits,Number>

      public class DigitsValidatorForNumber
      extends Object
      implements ConstraintValidator<Digits,Number>

  Validates that the `Number` being validates matches the pattern defined in the constraint.
  Author:
    Alaa Nassef, Hardy Ferentschik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DigitsValidatorForNumber()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initialize(Digits constraintAnnotation)`
    `boolean` | `isValid(Number num, ConstraintValidatorContext constraintValidatorContext)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DigitsValidatorForNumber

          public DigitsValidatorForNumber()

  - ### Method Detail

    - #### initialize

          public void initialize(Digits constraintAnnotation)

      Specified by:
        `initialize` in interface `ConstraintValidator<Digits,Number>`

    - #### isValid

          public boolean isValid(Number num,
                        ConstraintValidatorContext constraintValidatorContext)

      Specified by:
        `isValid` in interface `ConstraintValidator<Digits,Number>`

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved