Class ValidatorResult.ResultStatus

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    ValidatorResult

    protected class ValidatorResult.ResultStatus
    extends java.lang.Object
    implements java.io.Serializable
    Contains the status of the validation.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object result  
      private boolean valid  
    • Constructor Summary

      Constructors 
      Constructor Description
      ResultStatus​(boolean valid, java.lang.Object result)
      Construct a Result status.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getResult()
      Gets the result returned by a validation method.
      boolean isValid()
      Tests whether or not the validation passed.
      void setResult​(java.lang.Object result)
      Sets the result returned by a validation method.
      void setValid​(boolean valid)
      Sets whether or not the validation passed.
      • Methods inherited from class java.lang.Object

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

      • valid

        private boolean valid
      • result

        private java.lang.Object result
    • Constructor Detail

      • ResultStatus

        public ResultStatus​(boolean valid,
                            java.lang.Object result)
        Construct a Result status.
        Parameters:
        valid - Whether the validator passed or failed.
        result - Value returned by the validator.
    • Method Detail

      • isValid

        public boolean isValid()
        Tests whether or not the validation passed.
        Returns:
        true if the result was good.
      • setValid

        public void setValid​(boolean valid)
        Sets whether or not the validation passed.
        Parameters:
        valid - Whether the validation passed.
      • getResult

        public java.lang.Object getResult()
        Gets the result returned by a validation method. This can be used to retrieve to the correctly typed value of a date validation for example.
        Returns:
        The value returned by the validation.
      • setResult

        public void setResult​(java.lang.Object result)
        Sets the result returned by a validation method. This can be used to retrieve to the correctly typed value of a date validation for example.
        Parameters:
        result - The value returned by the validation.