Class RequireUtils


  • public final class RequireUtils
    extends java.lang.Object
    Utility class with some helper method to check validity of input arguments
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private RequireUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void requireNotBlank​(java.lang.String victim)
      Requires that the input string is not blank
      static void requireNotNull​(java.lang.Object victim)
      Requires that the input argument is not null
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequireUtils

        private RequireUtils()
    • Method Detail

      • requireNotBlank

        public static void requireNotBlank​(java.lang.String victim)
        Requires that the input string is not blank
        Parameters:
        victim - the string to be tested
        Throws:
        java.lang.IllegalArgumentException - if the input is blank
      • requireNotNull

        public static void requireNotNull​(java.lang.Object victim)
        Requires that the input argument is not null
        Parameters:
        victim - the string to be tested
        Throws:
        java.lang.IllegalArgumentException - if the input is null