値がnullでないかどうか検証する。
@param arg 検証対象の値
@param name 検証対象の引数の名前
@throws NullPointerException {@literal arg == null.}
8935
public static void notNull(final Object arg, final String name) {
        if(arg == null) {
            throw new NullPointerException(String.format("%s should not be null.", name));
        }
    }
1200546
static void checkNotNull(Object o, String arg) {
    if (o == null) {
      throw new IllegalArgumentException(String.format("'%s' must not be null.", arg));
    }
  }
35395
public static void isEmpty( Object[] argument,
                                String name ) {
        isNotNull(argument, name);
        if (argument.length > 0) {
            throw new IllegalArgumentException(CommonI18n.argumentMustBeEmpty.text(name));
        }
    }
830313
public static void objectNotNull(Object object1, String name1, Object object2, String name2) {
        if (verify) {
            if (object1 == null || object2 == null) {
                throw new IllegalArgumentException(name1+":"+object1+"  "+name2+":"+object2);
            }
        }
    }
890587
public static void parametersNotNull(final String names, final Object... objects) {
        String msgPrefix = "At least one of the parameters";

        if (objects != null) {
            if (objects.length == 1) {
                msgPrefix = "Parameter";
            }

            for (final Object object : objects) {
                if (object == null) {
                    raiseError(String.format("%s '%s' is null.", msgPrefix, names));
                }
            }
        }
    }
145845
@SuppressWarnings({"rawtypes", "unchecked"})
    public static <T extends Comparable> void notMax(final T arg, final T max, final String name) {
        
        if(arg == null) {
            throw new IllegalArgumentException(String.format("%s should not be null.", name));
        }
        
        if(arg.compareTo(max) > 0) {
            throw new IllegalArgumentException(String.format("%s cannot be greater than %s", name, max.toString()));
        }
        
    }
284121
public void setName(String name) {
		if (name == null) {
			throw new IllegalArgumentException("Field name cannot be null");
		}

		if (name.length() == 0 || name.length() > 10) {
			throw new IllegalArgumentException("Field name should be of length 0-10");
		}
		if (!DBFUtils.isPureAscii(name)) {
			throw new IllegalArgumentException("Field name must be ASCII");
		}
		this.name = name;
	}
1188527
@NonNull
  public static <K, V> Map<K, V> assertNotNullOrEmpty(Map<K, V> data, @Nullable String name) {
    if (isNullOrEmpty(data)) {
      throw new NullPointerException(name + " cannot be null or empty");
    }
    return data;
  }
187068
public static String notEmptyIfNotNull(String value, String name, String info) {
        if (value == null) {
            return value;
        }

        if (value.trim().length() == 0) {
            throw new IllegalArgumentException(name + " cannot be empty" + (info == null ? "" : ", " + info));
        }
        return value.trim();
    }
732935
public static <T> T checkNotNull(final String name,
                                     final T parameter) {
        if (parameter == null) {
            throw new IllegalArgumentException("Parameter named '" + name + "' should be not null!");
        }
        return parameter;
    }
1032904
private void verifyApplicationName(String name) {
    if (name == null) {
      throw new IllegalArgumentException("Application name cannot be null");
    }
    if (name.isEmpty()) {
      throw new IllegalArgumentException("Application name length must be > 0");
    }
    String reason = null;
    char[] chars = name.toCharArray();
    char c;
    for (int i = 0; i < chars.length; i++) {
      c = chars[i];
      if (c == 0) {
        reason = "null character not allowed @" + i;
        break;
      } else if (c == '/' || c == '.' || c == ':') {
        reason = "invalid character '" + c + "'";
        break;
      } else if (c > '\u0000' && c <= '\u001f' || c >= '\u007f' && c <= '\u009F'
          || c >= '\ud800' && c <= '\uf8ff' || c >= '\ufff0' && c <= '\uffff') {
        reason = "invalid character @" + i;
        break;
      }
    }
    if (reason != null) {
      throw new IllegalArgumentException(
          "Invalid application name \"" + name + "\" caused by " + reason);
    }
  }
1067606
public static void isNotEmpty( Iterator<?> argument,
                                   String name ) {
        isNotNull(argument, name);
        if (!argument.hasNext()) {
            throw new IllegalArgumentException(CommonI18n.argumentMayNotBeEmpty.text(name));
        }
    }
1113697
public static void notEmpty(Map map, String name) {
    notNull(map, name);

    if (map.isEmpty()) {
      throw new IllegalArgumentException(name + " must not be empty");
    }
  }
989367
public boolean isSymbolNull(String name) {
        CommandSymbol s = findSymbol(name);
        if (s == null) return true;
        if (s instanceof VarCommand) {
            VarCommand var = (VarCommand) s;
            Value v = var.getValue(this);
            if (v == null || v.get() == null || v instanceof NilValue) return true;
        }
        return false;
    }
379000
public static <T> void notNull(final String name, final T value) {
    if (value == null) {
      throw new IllegalArgumentException(name + " can not be null");
    }
  }
1184315
@Override
    public T parse(String arg) throws ParseException {
        if (isNull(arg)) {
            if (nullable) {
                return null;
            } else {
                throw new ParseException(ParseError.INVALID_PARAM, "Parameter doesn't take 'null' values: " + getName());
            }
        }
        return parseNonNull(arg);
    }
295663
public static String checkNotEmpty(final String name,
                                       final String parameter) {
        if (parameter == null || parameter.trim().length() == 0) {
            throw new IllegalArgumentException("Parameter named '" + name + "' should be filled!");
        }
        return parameter;
    }