ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 组件源码 ``` /** * <b>方法描述:</b> 增加元素(批量) <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-11 11:52:01 <br/> * * @param c * 入参|集合|{@link java.util.Collection} * @param cs * 入参|元素|{@link java.util.Collection} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "增加元素(批量)", style = "判断型", type = "同步组件", comment = "集合或元素为空时返回错误", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-11 11:52:01") @InParams(param = { @Param(name = "c", comment = "集合", type = java.util.Collection.class), @Param(name = "cs", comment = "元素", type = java.util.Collection.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) public static ResultBase P_addAll(Collection c, Collection cs) { if (c == null) return ResultBase.newFailureResult("TPTC1003", "集合为空集合"); if (cs == null) return ResultBase.newFailureResult("TPTC1003", "元素列表为空"); c.addAll(cs); return ResultBase.newSuccessResult(); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/bd/6d/bd6d1c3f493df4d1a9037b376b9685df_1868x862.png) # 参数说明及示例 ## 入口参数 集合:传入一个集合,示例: `[1,2,3]` 元素:添加进入集合的元素,示例: `[4,8,9]` > 注意:IDE 中集合和数组都以 [] 表示。