Class Validate

java.lang.Object
com.github.palindromicity.syslog.util.Validate

public class Validate extends Object
Utility class to validate arguments and the like.
  • Constructor Details

    • Validate

      public Validate()
  • Method Details

    • notNull

      public static void notNull(Object object, String name)
      Validate that an Object is not Null.
      Parameters:
      object - The object to validate
      name - the name to use in the thrown exception
      Throws:
      IllegalArgumentException - if object is null
    • notBlank

      public static void notBlank(String string, String name)
      Validate that an String is not Null or empty.
      Parameters:
      string - The String to validate
      name - the name to use in the thrown exception
      Throws:
      IllegalArgumentException - if string is null or empty