Class CheckUtils

java.lang.Object
com.labs64.netlicensing.util.CheckUtils

public class CheckUtils extends Object
Common utilities for precondition checking.
  • Constructor Details

    • CheckUtils

      public CheckUtils()
  • Method Details

    • paramNotNull

      public static void paramNotNull(Object parameter, String parameterName) throws MalformedArgumentsException
      Ensures that an object reference passed as a parameter to the calling method is not null.
      Parameters:
      parameter - param to check
      parameterName - name of the parameter
      Throws:
      MalformedArgumentsException - if parameter is null
    • paramNotEmpty

      public static void paramNotEmpty(String parameter, String parameterName) throws MalformedArgumentsException
      Ensures that a string passed as a parameter to the calling method is not null or empty.
      Parameters:
      parameter - param to check
      parameterName - name of the parameter
      Throws:
      MalformedArgumentsException - if parameter is null or empty