Class Validate


  • public final class Validate
    extends Object
    Validate Validation utility
    Version:
    $Revision: $
    Author:
    Aslak Knutsen
    • Method Detail

      • notNullOrEmpty

        public static void notNullOrEmpty​(String string,
                                          String message)
                                   throws IllegalArgumentException
        Checks that the specified String is not null or empty, throws exception if it is.
        Parameters:
        string - The object to check
        message - The exception message
        Throws:
        IllegalArgumentException - Thrown if obj is null
      • notNullAndNoNullValues

        public static void notNullAndNoNullValues​(Object[] objects,
                                                  String message)
        Checks that the specified array is not null or contain any null values.
        Parameters:
        objects - The object to check
        message - The exception message