Exemple #1
0
  /**
   * Checks for null object(s).
   *
   * @param input Object(s) to check.
   * @param isToThrow True to throw IAE on null, false otherwise.
   * @return True if null, false otherwise.
   */
  public static boolean checkNullObject(final boolean isToThrow, final Object... input) {

    // first, check array itself
    boolean result = BaseUtils.checkNullObject(input, isToThrow);

    // then, check elements
    if (!result) {

      for (final Object item : input) {

        result = BaseUtils.checkNullObject(item, isToThrow);

        if (result) {

          break;
        }
      }
    }

    return result;
  }
Exemple #2
0
  /**
   * Checks for null object.
   *
   * @param input Object to check.
   * @param isToThrow True to throw IAE on null, false otherwise.
   * @return True if null, false otherwise.
   */
  public static boolean checkNullObject(final Object input, final boolean isToThrow) {

    return BaseUtils.checkNullObject(input, isToThrow, null);
  }