接口的使用
amo.lib.linq.delegate.Predicate
| 程序包 | 说明 |
|---|---|
| amo.lib.linq |
-
amo.lib.linq中Predicate的使用
参数类型为Predicate的amo.lib.linq中的方法 修饰符和类型 方法 说明 TAbstractStream. find(Predicate<T> predicate)TStream. find(Predicate<T> predicate)find目前使用的where,可以为find添加独立的Stream支持,找到一个equ时就终止next,修改where,在next时记录是否已经有匹配的,如果有了,hasnext返回 false,反正find就只返回一个List<T>AbstractStream. findAll(Predicate<T> predicate)List<T>Stream. findAll(Predicate<T> predicate)TAbstractStream. first(Predicate<T> predicate)TStream. first(Predicate<T> predicate)Returns the first element in a sequence that satisfies the specified condition; this method throws an exception if no element in the sequence satisfies the condition.Stream<T>AbstractStream. where(Predicate<T> predicate)Stream<T>Stream. where(Predicate<T> predicate)Filters a sequence of values based on a predicate.