Class Require

java.lang.Object
xyz.ronella.trivial.handy.Require

public final class Require extends Object
A handy class for requiring objects.
Since:
2.3.0
  • Method Details

    • all

      @Deprecated public static void all(Object param, Object... params) throws RequireAllException
      Deprecated.
      Use the objects method instead.
      A method that checks if all the parameters were not null.
      Parameters:
      param - The required first parameter to check.
      params - The other parameters to check.
      Throws:
      RequireAllException - This will be thrown when at least one of the parameters has thrown an NPE.
    • objects

      public static void objects(Object obj, Object... objs) throws RequireAllException
      The method that checks if all the objects were not null.
      Parameters:
      obj - The required first obj to check.
      objs - The other objects to check.
      Throws:
      RequireAllException - This will be thrown when at least one of the parameters has thrown an NPE.
      Since:
      2.5.0