--- jsr166/src/extra166y/AbstractParallelAnyArray.java 2010/09/01 07:24:06 1.4 +++ jsr166/src/extra166y/AbstractParallelAnyArray.java 2015/01/18 20:17:32 1.18 @@ -1,10 +1,11 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ */ package extra166y; + import jsr166y.*; import static extra166y.Ops.*; import java.util.*; @@ -65,7 +66,7 @@ public abstract class AbstractParallelAn // A few public methods exported across all subclasses /** - * Return the number of elements selected using bound or + * Returns the number of elements selected using bound or * filter restrictions. Note that this method must evaluate * all selectors to return its result. * @return the number of elements @@ -82,11 +83,11 @@ public abstract class AbstractParallelAn /** * Returns the index of some element matching bound and filter * constraints, or -1 if none. - * @return index of matching element, or -1 if none. + * @return index of matching element, or -1 if none */ public int anyIndex() { if (!hasFilter()) - return (origin < fence)? origin : -1; + return (origin < fence) ? origin : -1; AtomicInteger result = new AtomicInteger(-1); PAS.FJSelectAny f = new PAS.FJSelectAny (this, origin, fence, null, result); @@ -95,7 +96,7 @@ public abstract class AbstractParallelAn } /** - * Returns true if there are no elements + * Returns true if there are no elements. * @return true if there are no elements */ public boolean isEmpty() { @@ -132,7 +133,7 @@ public abstract class AbstractParallelAn */ Object[] ogetArray() { return null; } double[] dgetArray() { return null; } - long[] lgetArray() { return null; } + long[] lgetArray() { return null; } abstract Object oget(int index); abstract double dget(int index); abstract long lget(int index); @@ -145,6 +146,7 @@ public abstract class AbstractParallelAn * oget, dget, etc. But most are overridden in most concrete * classes to avoid per-element dispatching. */ + void leafApply(int lo, int hi, Procedure procedure) { for (int i = lo; i < hi; ++i) if (isSelected(i)) @@ -274,7 +276,7 @@ public abstract class AbstractParallelAn /** * Shared support for select/map all -- probe filter, map, and * type to start selection driver, or do parallel mapping, or - * just copy, + * just copy. */ final Object[] allObjects(Class elementType) { if (hasFilter()) { @@ -403,7 +405,7 @@ public abstract class AbstractParallelAn int otherOffset, BinaryLongOp combiner) {} // Base of object ref array classes - static abstract class OPap extends AbstractParallelAnyArray { + abstract static class OPap extends AbstractParallelAnyArray { T[] array; OPap(ForkJoinPool ex, int origin, int fence, T[] array) { super(ex, origin, fence); @@ -433,7 +435,7 @@ public abstract class AbstractParallelAn } // Base of double array classes - static abstract class DPap extends AbstractParallelAnyArray { + abstract static class DPap extends AbstractParallelAnyArray { double[] array; DPap(ForkJoinPool ex, int origin, int fence, double[] array) { super(ex, origin, fence); @@ -463,7 +465,7 @@ public abstract class AbstractParallelAn } // Base of long array classes - static abstract class LPap extends AbstractParallelAnyArray { + abstract static class LPap extends AbstractParallelAnyArray { long[] array; LPap(ForkJoinPool ex, int origin, int fence, long[] array) { super(ex, origin, fence); @@ -513,7 +515,7 @@ public abstract class AbstractParallelAn return new ORPap(ex, origin, fence, array, selector); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OUOMPap(ex, origin, fence, array, op); } @@ -965,7 +967,7 @@ public abstract class AbstractParallelAn public ParallelLongArrayWithLongMapping withIndexedMapping (IntAndLongToLong mapper) { - return new LULCPap(ex, origin, fence, array, mapper); + return new LULCPap(ex, origin, fence, array, mapper); } public int indexOf(long target) { @@ -1133,6 +1135,16 @@ public abstract class AbstractParallelAn } } + static final class AndPredicate implements Predicate { + final Predicate first; + final Predicate second; + AndPredicate(Predicate first, + Predicate second) { + this.first = first; this.second = second; + } + public final boolean op(T x) { return first.op(x) && second.op(x); } + } + // Filtered (but unmapped) classes static final class OFPap extends ParallelArrayWithFilter { final Predicate selector; @@ -1149,7 +1161,7 @@ public abstract class AbstractParallelAn public ParallelArrayWithFilter withFilter (Predicate selector) { return new OFPap(ex, origin, fence, array, - CommonOps.andPredicate(this.selector, selector)); + new AndPredicate(this.selector, selector)); } public ParallelArrayWithFilter withIndexedFilter @@ -1159,7 +1171,7 @@ public abstract class AbstractParallelAn compoundIndexedSelector(this.selector, selector)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OFOMPap(ex, origin, fence, array, selector, op); } @@ -1189,7 +1201,7 @@ public abstract class AbstractParallelAn return new OFLCPap(ex, origin, fence, array, selector, mapper); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final Predicate s = selector; final Object[] a = this.array; for (int i = lo; i < hi; ++i) { @@ -1367,7 +1379,7 @@ public abstract class AbstractParallelAn return new DFLCPap(ex, origin, fence, array, selector, mapper); } - final void leafApply(int lo, int hi, DoubleProcedure procedure) { + final void leafApply(int lo, int hi, DoubleProcedure procedure) { final DoublePredicate s = selector; final double[] a = this.array; for (int i = lo; i < hi; ++i) { @@ -1547,7 +1559,7 @@ public abstract class AbstractParallelAn return new LFLCPap(ex, origin, fence, array, selector, mapper); } - final void leafApply(int lo, int hi, LongProcedure procedure) { + final void leafApply(int lo, int hi, LongProcedure procedure) { final LongPredicate s = selector; final long[] a = this.array; for (int i = lo; i < hi; ++i) { @@ -1700,7 +1712,7 @@ public abstract class AbstractParallelAn compoundIndexedSelector(this.selector, selector)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OROMPap(ex, origin, fence, array, selector, op); } @@ -1730,7 +1742,7 @@ public abstract class AbstractParallelAn return new ORLCPap(ex, origin, fence, array, selector, mapper); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndObjectPredicate s = selector; final Object[] a = this.array; for (int i = lo; i < hi; ++i) { @@ -1910,7 +1922,7 @@ public abstract class AbstractParallelAn return new DRLCPap(ex, origin, fence, array, selector, mapper); } - final void leafApply(int lo, int hi, DoubleProcedure procedure) { + final void leafApply(int lo, int hi, DoubleProcedure procedure) { final IntAndDoublePredicate s = selector; final double[] a = this.array; for (int i = lo; i < hi; ++i) { @@ -2090,7 +2102,7 @@ public abstract class AbstractParallelAn return new LRLCPap(ex, origin, fence, array, selector, mapper); } - final void leafApply(int lo, int hi, LongProcedure procedure) { + final void leafApply(int lo, int hi, LongProcedure procedure) { final IntAndLongPredicate s = selector; final long[] a = this.array; for (int i = lo; i < hi; ++i) { @@ -2218,7 +2230,7 @@ public abstract class AbstractParallelAn // Object-mapped - static abstract class OOMPap extends ParallelArrayWithMapping { + abstract static class OOMPap extends ParallelArrayWithMapping { final Op op; OOMPap(ForkJoinPool ex, int origin, int fence, T[] array, @@ -2248,7 +2260,7 @@ public abstract class AbstractParallelAn } } - static abstract class DOMPap extends ParallelDoubleArrayWithMapping { + abstract static class DOMPap extends ParallelDoubleArrayWithMapping { final DoubleToObject op; DOMPap(ForkJoinPool ex, int origin, int fence, double[] array, DoubleToObject op) { @@ -2277,7 +2289,7 @@ public abstract class AbstractParallelAn } } - static abstract class LOMPap extends ParallelLongArrayWithMapping { + abstract static class LOMPap extends ParallelLongArrayWithMapping { final LongToObject op; LOMPap(ForkJoinPool ex, int origin, int fence, long[] array, LongToObject op) { @@ -2314,7 +2326,7 @@ public abstract class AbstractParallelAn super(ex, origin, fence, array, op); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OUOMPap(ex, origin, fence, array, CommonOps.compoundOp(this.op, op)); @@ -2350,7 +2362,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final Op f = op; final Object[] a = this.array; for (int i = lo; i < hi; ++i) @@ -2412,7 +2424,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final double[] a = this.array; final DoubleToObject f = op; for (int i = lo; i < hi; ++i) @@ -2474,7 +2486,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final long[] a = this.array; final LongToObject f = op; for (int i = lo; i < hi; ++i) @@ -2508,7 +2520,7 @@ public abstract class AbstractParallelAn boolean hasFilter() { return true; } boolean isSelected(int i) { return selector.op(this.array[i]); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OFOMPap (ex, origin, fence, array, selector, @@ -2545,7 +2557,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final Predicate s = selector; final Object[] a = this.array; final Op f = op; @@ -2633,7 +2645,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final DoublePredicate s = selector; final DoubleToObject f = op; final double[] a = this.array; @@ -2715,7 +2727,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final LongPredicate s = selector; final LongToObject f = op; final long[] a = this.array; @@ -2763,7 +2775,7 @@ public abstract class AbstractParallelAn boolean hasFilter() { return true; } boolean isSelected(int i) { return selector.op(i, this.array[i]); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OROMPap (ex, origin, fence, array, selector, @@ -2798,7 +2810,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndObjectPredicate s = selector; final Object[] a = this.array; final Op f = op; @@ -2886,7 +2898,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndDoublePredicate s = selector; final DoubleToObject f = op; final double[] a = this.array; @@ -2968,7 +2980,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndLongPredicate s = selector; final LongToObject f = op; final long[] a = this.array; @@ -3003,7 +3015,7 @@ public abstract class AbstractParallelAn // Object-combined - static abstract class OOCPap extends ParallelArrayWithMapping { + abstract static class OOCPap extends ParallelArrayWithMapping { final IntAndObjectToObject op; OOCPap(ForkJoinPool ex, int origin, int fence, T[] array, @@ -3035,7 +3047,7 @@ public abstract class AbstractParallelAn } } - static abstract class DOCPap extends ParallelDoubleArrayWithMapping { + abstract static class DOCPap extends ParallelDoubleArrayWithMapping { final IntAndDoubleToObject op; DOCPap(ForkJoinPool ex, int origin, int fence, double[] array, IntAndDoubleToObject op) { @@ -3066,7 +3078,7 @@ public abstract class AbstractParallelAn } } - static abstract class LOCPap extends ParallelLongArrayWithMapping { + abstract static class LOCPap extends ParallelLongArrayWithMapping { final IntAndLongToObject op; LOCPap(ForkJoinPool ex, int origin, int fence, long[] array, IntAndLongToObject op) { @@ -3105,7 +3117,7 @@ public abstract class AbstractParallelAn super(ex, origin, fence, array, op); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OUOCPap(ex, origin, fence, array, compoundIndexedOp(this.op, op)); @@ -3141,7 +3153,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndObjectToObject f = op; final Object[] a = this.array; for (int i = lo; i < hi; ++i) @@ -3203,7 +3215,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndDoubleToObject f = op; final double[] a = this.array; for (int i = lo; i < hi; ++i) @@ -3265,7 +3277,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndLongToObject f = op; final long[] a = this.array; for (int i = lo; i < hi; ++i) @@ -3287,7 +3299,7 @@ public abstract class AbstractParallelAn // object-combined filtered - static final class OFOCPap extends OOCPap { + static final class OFOCPap extends OOCPap { final Predicate selector; OFOCPap(ForkJoinPool ex, int origin, int fence, T[] array, Predicate selector, @@ -3299,7 +3311,7 @@ public abstract class AbstractParallelAn boolean hasFilter() { return true; } boolean isSelected(int i) { return selector.op(this.array[i]); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OFOCPap(ex, origin, fence, array, selector, compoundIndexedOp(this.op, op)); @@ -3337,7 +3349,7 @@ public abstract class AbstractParallelAn (this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final Predicate s = selector; final Object[] a = this.array; final IntAndObjectToObject f = op; @@ -3417,7 +3429,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final DoublePredicate s = selector; final double[] a = this.array; final IntAndDoubleToObject f = op; @@ -3497,7 +3509,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final LongPredicate s = selector; final long[] a = this.array; final IntAndLongToObject f = op; @@ -3530,7 +3542,7 @@ public abstract class AbstractParallelAn } // Object-combined, relational - static final class OROCPap extends OOCPap { + static final class OROCPap extends OOCPap { final IntAndObjectPredicate selector; OROCPap(ForkJoinPool ex, int origin, int fence, T[] array, IntAndObjectPredicate selector, @@ -3542,7 +3554,7 @@ public abstract class AbstractParallelAn boolean hasFilter() { return true; } boolean isSelected(int i) { return selector.op(i, this.array[i]); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return new OROCPap(ex, origin, fence, array, selector, compoundIndexedOp(this.op, op)); @@ -3580,7 +3592,7 @@ public abstract class AbstractParallelAn (this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndObjectPredicate s = selector; final Object[] a = this.array; final IntAndObjectToObject f = op; @@ -3660,7 +3672,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndDoublePredicate s = selector; final double[] a = this.array; final IntAndDoubleToObject f = op; @@ -3740,7 +3752,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, mapper)); } - void leafApply(int lo, int hi, Procedure procedure) { + void leafApply(int lo, int hi, Procedure procedure) { final IntAndLongPredicate s = selector; final long[] a = this.array; final IntAndLongToObject f = op; @@ -3774,7 +3786,7 @@ public abstract class AbstractParallelAn // Double-mapped - static abstract class ODMPap extends ParallelArrayWithDoubleMapping { + abstract static class ODMPap extends ParallelArrayWithDoubleMapping { final ObjectToDouble op; ODMPap(ForkJoinPool ex, int origin, int fence, T[] array, ObjectToDouble op) { @@ -3804,7 +3816,7 @@ public abstract class AbstractParallelAn } - static abstract class DDMPap extends ParallelDoubleArrayWithDoubleMapping { + abstract static class DDMPap extends ParallelDoubleArrayWithDoubleMapping { final DoubleOp op; DDMPap (ForkJoinPool ex, int origin, int fence, @@ -3834,7 +3846,7 @@ public abstract class AbstractParallelAn } } - static abstract class LDMPap extends ParallelLongArrayWithDoubleMapping { + abstract static class LDMPap extends ParallelLongArrayWithDoubleMapping { final LongToDouble op; LDMPap(ForkJoinPool ex, int origin, int fence, long[] array, LongToDouble op) { @@ -3882,7 +3894,7 @@ public abstract class AbstractParallelAn CommonOps.compoundOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (DoubleToObject op) { return new OUOMPap(ex, origin, fence, array, CommonOps.compoundOp(this.op, op)); @@ -4070,7 +4082,7 @@ public abstract class AbstractParallelAn CommonOps.compoundOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (DoubleToObject op) { return new OFOMPap(ex, origin, fence, array, selector, CommonOps.compoundOp(this.op, op)); @@ -4306,7 +4318,7 @@ public abstract class AbstractParallelAn CommonOps.compoundOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (DoubleToObject op) { return new OROMPap(ex, origin, fence, array, selector, CommonOps.compoundOp(this.op, op)); @@ -4520,7 +4532,7 @@ public abstract class AbstractParallelAn } // double-combined - static abstract class ODCPap extends ParallelArrayWithDoubleMapping { + abstract static class ODCPap extends ParallelArrayWithDoubleMapping { final IntAndObjectToDouble op; ODCPap(ForkJoinPool ex, int origin, int fence, T[] array, IntAndObjectToDouble op) { @@ -4552,7 +4564,7 @@ public abstract class AbstractParallelAn } - static abstract class DDCPap extends ParallelDoubleArrayWithDoubleMapping { + abstract static class DDCPap extends ParallelDoubleArrayWithDoubleMapping { final IntAndDoubleToDouble op; DDCPap(ForkJoinPool ex, int origin, int fence, double[] array, IntAndDoubleToDouble op) { @@ -4583,7 +4595,7 @@ public abstract class AbstractParallelAn } } - static abstract class LDCPap extends ParallelLongArrayWithDoubleMapping { + abstract static class LDCPap extends ParallelLongArrayWithDoubleMapping { final IntAndLongToDouble op; LDCPap(ForkJoinPool ex, int origin, int fence, long[] array, IntAndLongToDouble op) { @@ -4631,7 +4643,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (DoubleToObject op) { return new OUOCPap(ex, origin, fence, array, compoundIndexedOp(this.op, op)); @@ -4818,7 +4830,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (DoubleToObject op) { return new OFOCPap(ex, origin, fence, array, selector, compoundIndexedOp(this.op, op)); @@ -5056,7 +5068,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (DoubleToObject op) { return new OROCPap(ex, origin, fence, array, selector, compoundIndexedOp(this.op, op)); @@ -5271,7 +5283,7 @@ public abstract class AbstractParallelAn } // long-combined - static abstract class OLMPap extends ParallelArrayWithLongMapping { + abstract static class OLMPap extends ParallelArrayWithLongMapping { final ObjectToLong op; OLMPap(ForkJoinPool ex, int origin, int fence, T[] array, final ObjectToLong op) { @@ -5300,7 +5312,7 @@ public abstract class AbstractParallelAn } } - static abstract class DLMPap extends ParallelDoubleArrayWithLongMapping { + abstract static class DLMPap extends ParallelDoubleArrayWithLongMapping { final DoubleToLong op; DLMPap(ForkJoinPool ex, int origin, int fence, double[] array, DoubleToLong op) { @@ -5330,7 +5342,7 @@ public abstract class AbstractParallelAn } - static abstract class LLMPap extends ParallelLongArrayWithLongMapping { + abstract static class LLMPap extends ParallelLongArrayWithLongMapping { final LongOp op; LLMPap(ForkJoinPool ex, int origin, int fence, long[] array, LongOp op) { @@ -5377,7 +5389,7 @@ public abstract class AbstractParallelAn CommonOps.compoundOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (LongToObject op) { return new OUOMPap(ex, origin, fence, array, CommonOps.compoundOp(this.op, op)); @@ -5566,7 +5578,7 @@ public abstract class AbstractParallelAn CommonOps.compoundOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (LongToObject op) { return new OFOMPap(ex, origin, fence, array, selector, CommonOps.compoundOp(this.op, op)); @@ -5806,7 +5818,7 @@ public abstract class AbstractParallelAn CommonOps.compoundOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (LongToObject op) { return new OROMPap(ex, origin, fence, array, selector, CommonOps.compoundOp(this.op, op)); @@ -6022,7 +6034,7 @@ public abstract class AbstractParallelAn } // long-combined - static abstract class OLCPap extends ParallelArrayWithLongMapping { + abstract static class OLCPap extends ParallelArrayWithLongMapping { final IntAndObjectToLong op; OLCPap(ForkJoinPool ex, int origin, int fence, T[] array, IntAndObjectToLong op) { @@ -6053,7 +6065,7 @@ public abstract class AbstractParallelAn } } - static abstract class DLCPap extends ParallelDoubleArrayWithLongMapping { + abstract static class DLCPap extends ParallelDoubleArrayWithLongMapping { final IntAndDoubleToLong op; DLCPap(ForkJoinPool ex, int origin, int fence, double[] array, IntAndDoubleToLong op) { @@ -6084,7 +6096,7 @@ public abstract class AbstractParallelAn } } - static abstract class LLCPap extends ParallelLongArrayWithLongMapping { + abstract static class LLCPap extends ParallelLongArrayWithLongMapping { final IntAndLongToLong op; LLCPap(ForkJoinPool ex, int origin, int fence, long[] array, IntAndLongToLong op) { @@ -6132,7 +6144,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (LongToObject op) { return new OUOCPap(ex, origin, fence, array, compoundIndexedOp(this.op, op)); @@ -6317,7 +6329,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (LongToObject op) { return new OFOCPap(ex, origin, fence, array, selector, @@ -6559,7 +6571,7 @@ public abstract class AbstractParallelAn compoundIndexedOp(this.op, op)); } - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (LongToObject op) { return new OROCPap(ex, origin, fence, array, selector, @@ -6809,7 +6821,7 @@ public abstract class AbstractParallelAn int cursor; FilteredAsDoubleIterator() { cursor = origin; - advance() ; + advance(); } private void advance() { while (cursor < fence) { @@ -6862,7 +6874,7 @@ public abstract class AbstractParallelAn int cursor; FilteredAsLongIterator() { cursor = origin; - advance() ; + advance(); } private void advance() { while (cursor < fence) { @@ -6915,7 +6927,7 @@ public abstract class AbstractParallelAn int cursor; FilteredIterator() { cursor = origin; - advance() ; + advance(); } private void advance() { while (cursor < fence) { @@ -7872,14 +7884,14 @@ public abstract class AbstractParallelAn }; } - static IntAndDoublePredicate compoundIndexedSelector + static IntAndDoublePredicate compoundIndexedSelector (final IntAndDoublePredicate fst, final IntAndDoublePredicate snd) { return new IntAndDoublePredicate() { public boolean op(int i, double a) { return fst.op(i, a) && snd.op(i, a); } }; } - static IntAndDoublePredicate compoundIndexedSelector + static IntAndDoublePredicate compoundIndexedSelector (final IntAndDoublePredicate fst, final DoublePredicate snd) { return new IntAndDoublePredicate() { public boolean op(int i, double a) { return fst.op(i, a) && snd.op(a); } @@ -7893,14 +7905,14 @@ public abstract class AbstractParallelAn }; } - static IntAndLongPredicate compoundIndexedSelector + static IntAndLongPredicate compoundIndexedSelector (final IntAndLongPredicate fst, final IntAndLongPredicate snd) { return new IntAndLongPredicate() { public boolean op(int i, long a) { return fst.op(i, a) && snd.op(i, a); } }; } - static IntAndLongPredicate compoundIndexedSelector + static IntAndLongPredicate compoundIndexedSelector (final IntAndLongPredicate fst, final LongPredicate snd) { return new IntAndLongPredicate() { public boolean op(int i, long a) { return fst.op(i, a) && snd.op(a); }