Class ValidationUtils

java.lang.Object
panda.utilities.ValidationUtils

public final class ValidationUtils extends Object
  • Method Details

    • notNull

      public static <T> T notNull(@Nullable T value)
      Require not null value or throw exception
      Type Parameters:
      T - type of value
      Parameters:
      value - the value to validate
      Returns:
      non null value
    • notNull

      public static <T> T notNull(@Nullable T value, String message)
      Require not null value or throw exception with the given message
      Type Parameters:
      T - type of value
      Parameters:
      value - the value to validate
      message - the message to throw if value is null
      Returns:
      non null value