本文整理了Java中org.wildfly.common.Assert.checkNotNullParamChecked()
方法的一些代码示例,展示了Assert.checkNotNullParamChecked()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.checkNotNullParamChecked()
方法的具体详情如下:
包路径:org.wildfly.common.Assert
类名称:Assert
方法名:checkNotNullParamChecked
暂无
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is greater than or equal to {@code min}.
*
* @param name the parameter name
* @param min the minimum value
* @param actual the actual parameter value
* @throws IllegalArgumentException if the actual value is less than the minimum value
*/
public static void checkMinimumParameter(String name, double min, double actual) throws IllegalArgumentException {
checkNotNullParamChecked("name", name);
if (actual < min) throw CommonMessages.msg.paramLessThan(name, min);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the given offset and length fall completely within the bounds of the given array.
*
* @param array the array to check
* @param offs the array offset
* @param len the array length
* @throws ArrayIndexOutOfBoundsException if the range of the offset and length do not fall within the array bounds
*/
public static void checkArrayBounds(final Object[] array, final int offs, final int len) throws ArrayIndexOutOfBoundsException {
checkNotNullParamChecked("array", array);
checkArrayBounds(array.length, offs, len);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is greater than or equal to {@code min}.
*
* @param name the parameter name
* @param min the minimum value
* @param actual the actual parameter value
* @throws IllegalArgumentException if the actual value is less than the minimum value
*/
public static void checkMinimumParameter(String name, long min, long actual) throws IllegalArgumentException {
checkNotNullParamChecked("name", name);
if (actual < min) throw CommonMessages.msg.paramLessThan(name, min);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is less than or equal to {@code max}.
*
* @param name the parameter name
* @param max the maximum value
* @param actual the actual parameter value
* @throws IllegalArgumentException if the actual value is greater than the minimum value
*/
public static void checkMaximumParameter(String name, int max, int actual) throws IllegalArgumentException {
checkNotNullParamChecked("name", name);
if (actual > max) throw CommonMessages.msg.paramGreaterThan(name, max);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is greater than or equal to {@code min}.
*
* @param name the parameter name
* @param min the minimum value
* @param actual the actual parameter value
* @throws IllegalArgumentException if the actual value is less than the minimum value
*/
public static void checkMinimumParameter(String name, float min, float actual) throws IllegalArgumentException {
checkNotNullParamChecked("name", name);
if (actual < min) throw CommonMessages.msg.paramLessThan(name, min);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is less than or equal to {@code max}.
*
* @param name the parameter name
* @param max the maximum value
* @param actual the actual parameter value
* @throws IllegalArgumentException if the actual value is greater than the minimum value
*/
public static void checkMaximumParameter(String name, long max, long actual) throws IllegalArgumentException {
checkNotNullParamChecked("name", name);
if (actual > max) throw CommonMessages.msg.paramGreaterThan(name, max);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is less than or equal to {@code max}.
*
* @param name the parameter name
* @param max the maximum value
* @param actual the actual parameter value
* @throws IllegalArgumentException if the actual value is greater than the minimum value
*/
public static void checkMaximumParameter(String name, double max, double actual) throws IllegalArgumentException {
checkNotNullParamChecked("name", name);
if (actual > max) throw CommonMessages.msg.paramGreaterThan(name, max);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the given offset and length fall completely within the bounds of the given array.
*
* @param array the array to check
* @param offs the array offset
* @param len the array length
* @throws ArrayIndexOutOfBoundsException if the range of the offset and length do not fall within the array bounds
*/
public static void checkArrayBounds(final byte[] array, final int offs, final int len) throws ArrayIndexOutOfBoundsException {
checkNotNullParamChecked("array", array);
checkArrayBounds(array.length, offs, len);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the given offset and length fall completely within the bounds of the given array.
*
* @param array the array to check
* @param offs the array offset
* @param len the array length
* @throws ArrayIndexOutOfBoundsException if the range of the offset and length do not fall within the array bounds
*/
public static void checkArrayBounds(final char[] array, final int offs, final int len) throws ArrayIndexOutOfBoundsException {
checkNotNullParamChecked("array", array);
checkArrayBounds(array.length, offs, len);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the given offset and length fall completely within the bounds of the given array.
*
* @param array the array to check
* @param offs the array offset
* @param len the array length
* @throws ArrayIndexOutOfBoundsException if the range of the offset and length do not fall within the array bounds
*/
public static void checkArrayBounds(final long[] array, final int offs, final int len) throws ArrayIndexOutOfBoundsException {
checkNotNullParamChecked("array", array);
checkArrayBounds(array.length, offs, len);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is greater than or equal to {@code min}.
*
* @param name the parameter name
* @param min the minimum value
* @param actual the actual parameter value
* @throws IllegalArgumentException if the actual value is less than the minimum value
*/
public static void checkMinimumParameter(String name, int min, int actual) throws IllegalArgumentException {
checkNotNullParamChecked("name", name);
if (actual < min) throw CommonMessages.msg.paramLessThan(name, min);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is less than or equal to {@code max}.
*
* @param name the parameter name
* @param max the maximum value
* @param actual the actual parameter value
* @throws IllegalArgumentException if the actual value is greater than the minimum value
*/
public static void checkMaximumParameter(String name, float max, float actual) throws IllegalArgumentException {
checkNotNullParamChecked("name", name);
if (actual > max) throw CommonMessages.msg.paramGreaterThan(name, max);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the given offset and length fall completely within the bounds of the given array.
*
* @param array the array to check
* @param offs the array offset
* @param len the array length
* @throws ArrayIndexOutOfBoundsException if the range of the offset and length do not fall within the array bounds
*/
public static void checkArrayBounds(final int[] array, final int offs, final int len) throws ArrayIndexOutOfBoundsException {
checkNotNullParamChecked("array", array);
checkArrayBounds(array.length, offs, len);
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is not empty. Use a standard exception message if it is.
*
* @param name the parameter name
* @param value the parameter value
* @return the value that was passed in
* @throws IllegalArgumentException if the value is empty
*/
@NotNull
public static <K, V, T extends Map<K, V>> T checkNotEmptyParam(String name, T value) {
checkNotNullParamChecked("name", name);
checkNotNullParamChecked("value", value);
if (value.isEmpty()) throw CommonMessages.msg.emptyParam(name);
return value;
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is not empty. Use a standard exception message if it is.
*
* @param name the parameter name
* @param value the parameter value
* @return the value that was passed in
* @throws IllegalArgumentException if the value is empty
*/
@NotNull
public static double[] checkNotEmptyParam(String name, double[] value) {
checkNotNullParamChecked("name", name);
checkNotNullParamChecked("value", value);
if (value.length == 0) throw CommonMessages.msg.emptyParam(name);
return value;
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is not empty. Use a standard exception message if it is.
*
* @param name the parameter name
* @param value the parameter value
* @return the value that was passed in
* @throws IllegalArgumentException if the value is empty
*/
@NotNull
public static <E, T extends Collection<E>> T checkNotEmptyParam(String name, T value) {
checkNotNullParamChecked("name", name);
checkNotNullParamChecked("value", value);
if (value.isEmpty()) throw CommonMessages.msg.emptyParam(name);
return value;
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is not empty. Use a standard exception message if it is.
*
* @param name the parameter name
* @param value the parameter value
* @return the value that was passed in
* @throws IllegalArgumentException if the value is empty
*/
@NotNull
public static byte[] checkNotEmptyParam(String name, byte[] value) {
checkNotNullParamChecked("name", name);
checkNotNullParamChecked("value", value);
if (value.length == 0) throw CommonMessages.msg.emptyParam(name);
return value;
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is not empty. Use a standard exception message if it is.
*
* @param name the parameter name
* @param value the parameter value
* @return the value that was passed in
* @throws IllegalArgumentException if the value is empty
*/
@NotNull
public static int[] checkNotEmptyParam(String name, int[] value) {
checkNotNullParamChecked("name", name);
checkNotNullParamChecked("value", value);
if (value.length == 0) throw CommonMessages.msg.emptyParam(name);
return value;
}
代码示例来源:origin: wildfly/wildfly
/**
* Check that the named parameter is not empty. Use a standard exception message if it is.
*
* @param name the parameter name
* @param value the parameter value
* @return the value that was passed in
* @throws IllegalArgumentException if the value is empty
*/
@NotNull
public static short[] checkNotEmptyParam(String name, short[] value) {
checkNotNullParamChecked("name", name);
checkNotNullParamChecked("value", value);
if (value.length == 0) throw CommonMessages.msg.emptyParam(name);
return value;
}
代码示例来源:origin: wildfly/wildfly
/**
* Return an exception indicating that the current switch case was intended to be unreachable.
*
* @param obj the switch case value
* @return the exception which may be immediately thrown
*/
@NotNull
public static IllegalStateException impossibleSwitchCase(@NotNull Object obj) {
Assert.checkNotNullParamChecked("obj", obj);
return CommonMessages.msg.impossibleSwitchCase(obj);
}
内容来源于网络,如有侵权,请联系作者删除!