Interface Constraint

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean exists()
      Check if the key that represents the constraint exists.
      boolean isNull()
      Check if the value of the constraint is null.
    • Method Detail

      • exists

        boolean exists()
        Check if the key that represents the constraint exists. It does not matter whether the value of the key is null or not.

        For example, exists() method of an instance that represents given_name in the JSON below will return true.

         {
           "verified_claims": {
             "claims": {
               "given_name": null
             }
           }
         }
         
        Returns:
        true if the key that represents the constraint exists.
      • isNull

        boolean isNull()
        Check if the value of the constraint is null.

        For example, isNull() method of an instance that represents given_name in the JSON below will return true.

         {
           "verified_claims": {
             "claims": {
               "given_name": null
             }
           }
         }
         
        But, the method returns false in the following case.
         {
           "verified_claims": {
             "claims": {
               "given_name": {
               }
             }
           }
         }
         
        Returns:
        true if the value of the constraint is null.