Class LongTypeValidator

  • All Implemented Interfaces:
    Validator

    public class LongTypeValidator
    extends TypeValidator
    Checks the type of the value if the type of the field is a Long or long.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean appliesTo​(java.lang.Class<?> type)
      Used by apply to figure out whether to apply the validation or simply return.
      static LongTypeValidator getInstance()
      Get the instance.
      protected void validate​(java.lang.Class<?> type, java.lang.Object value, java.util.List<ValidationFailure> validationFailures)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LongTypeValidator

        public LongTypeValidator()
    • Method Detail

      • getInstance

        public static LongTypeValidator getInstance()
        Get the instance.
        Returns:
        the Singleton instance of this validator
      • appliesTo

        protected boolean appliesTo​(java.lang.Class<?> type)
        Description copied from class: TypeValidator
        Used by apply to figure out whether to apply the validation or simply return.
        Specified by:
        appliesTo in class TypeValidator
        Parameters:
        type - the type to be validated
        Returns:
        true if this validator applies to this type, false otherwise
      • validate

        protected void validate​(java.lang.Class<?> type,
                                java.lang.Object value,
                                java.util.List<ValidationFailure> validationFailures)
        Specified by:
        validate in class TypeValidator