public class OperatorHelper extends Object
| Constructor and Description |
|---|
OperatorHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkItemNotNull(Object[] objects) |
static void |
checkObjectSizeEq(Object[] objects,
int size)
检查参数数量,等于 size
|
static void |
checkObjectSizeEq(Object[] objects,
int size1,
int size2)
检查参数数量,等于 size1 或 size2
|
static void |
checkObjectSizeEqOne(Object[] objects)
检查参数数量,等于 1
|
static void |
checkObjectSizeEqThree(Object[] objects)
检查参数数量,等于 3
|
static void |
checkObjectSizeEqTwo(Object[] objects)
检查参数数量,等于 2
|
static void |
checkObjectSizeGteTwo(Object[] objects)
检查参数数量,大于等于 2
|
static void |
checkObjectSizeGtZero(Object[] objects)
检查参数数量,大于 0
|
static void |
checkObjMustBeBooleanTypeItem(Object object)
所谓Boolean item,指的是那些最终的结果值为布尔类型的Item
布尔类型的items有,if,while,break类型的Node,以及AndOrCondition以及NotCondition
|
static void |
checkObjMustBeCommonTypeItem(Object object)
检查对象是否为一个正常可执行的对象。
|
static void |
checkObjMustBeForTypeItem(Object object) |
static void |
checkObjMustBeIteratorTypeItem(Object object) |
static void |
checkObjMustBeSwitchTypeItem(Object object) |
static <T> T |
convert(Object object,
Class<T> clazz)
转换 object 为指定的类型 如果是Node类型的则进行copy
为什么要进行copy呢?
|
static <T> T |
convert(Object object,
Class<T> clazz,
String errorMsg)
转换 object 为指定的类型,自定义错误信息 如果是Node类型的则进行copy
|
static Double |
convert2Double(Object object) |
public static void checkObjectSizeGtZero(Object[] objects) throws com.ql.util.express.exception.QLException
objects - objectscom.ql.util.express.exception.QLException - QLExceptionpublic static void checkObjectSizeGteTwo(Object[] objects) throws com.ql.util.express.exception.QLException
objects - objectscom.ql.util.express.exception.QLException - QLExceptionpublic static void checkObjectSizeEqOne(Object[] objects) throws com.ql.util.express.exception.QLException
objects - objectscom.ql.util.express.exception.QLException - QLExceptionpublic static void checkObjectSizeEqTwo(Object[] objects) throws com.ql.util.express.exception.QLException
objects - objectscom.ql.util.express.exception.QLException - QLExceptionpublic static void checkObjectSizeEqThree(Object[] objects) throws com.ql.util.express.exception.QLException
objects - objectscom.ql.util.express.exception.QLException - QLExceptionpublic static void checkObjectSizeEq(Object[] objects, int size) throws com.ql.util.express.exception.QLException
objects - objectssize - 参数数量com.ql.util.express.exception.QLException - QLExceptionpublic static void checkObjectSizeEq(Object[] objects, int size1, int size2) throws com.ql.util.express.exception.QLException
objects - objectssize1 - 参数数量1size2 - 参数数量2com.ql.util.express.exception.QLException - QLExceptionpublic static <T> T convert(Object object, Class<T> clazz) throws com.ql.util.express.exception.QLException
com.ql.util.express.exception.QLExceptionpublic static Double convert2Double(Object object) throws com.ql.util.express.exception.QLException
com.ql.util.express.exception.QLExceptionpublic static <T> T convert(Object object, Class<T> clazz, String errorMsg) throws com.ql.util.express.exception.QLException
com.ql.util.express.exception.QLExceptionpublic static void checkItemNotNull(Object[] objects) throws com.ql.util.express.exception.QLException
com.ql.util.express.exception.QLExceptionpublic static void checkObjMustBeCommonTypeItem(Object object) throws Exception
Exceptionpublic static void checkObjMustBeBooleanTypeItem(Object object) throws Exception
object - 检查的对象Exception - 检查过程中抛的错public static void checkObjMustBeForTypeItem(Object object) throws Exception
Exceptionpublic static void checkObjMustBeIteratorTypeItem(Object object) throws Exception
ExceptionCopyright © 2025. All rights reserved.