ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/extra166y/AbstractParallelAnyArray.java
(Generate patch)

Comparing jsr166/src/extra166y/AbstractParallelAnyArray.java (file contents):
Revision 1.6 by jsr166, Tue Mar 15 19:47:02 2011 UTC vs.
Revision 1.7 by dl, Sat May 7 13:11:42 2011 UTC

# Line 1133 | Line 1133 | public abstract class AbstractParallelAn
1133          }
1134      }
1135  
1136 +    static final class AndPredicate<T> implements Predicate<T> {
1137 +        final Predicate<? super T> first;
1138 +        final Predicate<? super T> second;
1139 +        AndPredicate(Predicate<? super T> first,
1140 +                     Predicate<? super T> second) {
1141 +            this.first = first; this.second = second;
1142 +        }
1143 +        public final boolean op(T x) { return first.op(x) && second.op(x); }
1144 +    }
1145 +
1146      // Filtered (but unmapped) classes
1147      static final class OFPap<T> extends ParallelArrayWithFilter<T> {
1148          final Predicate<? super T> selector;
# Line 1149 | Line 1159 | public abstract class AbstractParallelAn
1159          public ParallelArrayWithFilter<T> withFilter
1160              (Predicate<? super T> selector) {
1161              return new OFPap<T>(ex, origin, fence, array,
1162 <                                CommonOps.andPredicate(this.selector, selector));
1162 >                                new AndPredicate(this.selector, selector));
1163          }
1164  
1165          public ParallelArrayWithFilter<T> withIndexedFilter

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines