接口的使用
amo.lib.linq.delegate.Predicate

使用Predicate的程序包 
程序包 说明
amo.lib.linq  
  • amo.lib.linqPredicate的使用

    参数类型为Predicateamo.lib.linq中的方法 
    修饰符和类型 方法 说明
    T AbstractStream.find​(Predicate<T> predicate)  
    T Stream.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)  
    T AbstractStream.first​(Predicate<T> predicate)  
    T Stream.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.