🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 组件源码 ``` /** * <b>方法描述:</b> 集合删除(元素) <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-11 11:52:18 <br/> * * @param c * 入参|集合|{@link java.util.Collection} * @param obj * 入参|元素|{@link Object} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "集合删除(元素)", style = "判断型", type = "同步组件", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-11 11:52:18") @InParams(param = { @Param(name = "c", comment = "集合", type = java.util.Collection.class), @Param(name = "obj", comment = "元素", type = Object.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) public static ResultBase P_remove(Collection c, Object obj) { if (c == null ) return ResultBase.newFailureResult("TPTC1006", "组件参数输入错误,集合为Null"); if ( c.isEmpty() || !c.contains(obj)) return ResultBase.newFailureResult("TPTC1006", "组件参数输入错误,不包含该元素:"+obj); c.remove(obj); return ResultBase.newSuccessResult(); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/ae/15/ae159f92d9a1a299acf1893699441516_1866x867.png) # 参数说明及示例 ## 入口参数 集合:传入一个非空集合,示例: `__REQ__["list"]` 元素:传入一个元素,如果元素未在集合中会报错,示例: `__REQ__["object"]` > 注意:IDE 中集合和数组都以 [] 表示。