Class Preconditions

java.lang.Object
org.irods.irods4j.input_validation.Preconditions

public class Preconditions extends Object
  • Constructor Details

    • Preconditions

      public Preconditions()
  • Method Details

    • notNull

      public static void notNull(Object o, String message)
      Checks if the object is null.
      Parameters:
      o - The object to check for null.
      message - The precondition violation message.
      Throws:
      PreconditionViolationException - If the object is null.
      Since:
      0.1.0
    • notNullOrEmpty

      public static void notNullOrEmpty(String s, String message)
      Checks if a string is null or empty.
      Parameters:
      s - The string to check.
      message - The precondition violation message.
      Throws:
      PreconditionViolationException - If the object is null.
      Since:
      0.1.0
    • greaterThanOrEqualToValue

      public static void greaterThanOrEqualToValue(long value, long threshold, String message)
      Checks if an integer is greater than or equal to a threshold.
      Parameters:
      value - The integer to test.
      threshold - The integer to test against.
      message - The precondition violation message.
      Throws:
      PreconditionViolationException - If the object is null.
      Since:
      0.1.0