diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/control/FluxSource.java b/cyclops-reactor/src/main/java/com/aol/cyclops/control/FluxSource.java index 66b81709..987d4cc1 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/control/FluxSource.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/control/FluxSource.java @@ -1,6 +1,5 @@ package com.aol.cyclops.control; - import java.util.Objects; import java.util.stream.Stream; @@ -37,8 +36,8 @@ public class FluxSource { */ public static MultipleFluxSource ofMultiple() { return new MultipleFluxSource( - FluxSource.ofUnbounded() - .createQueue()); + FluxSource.ofUnbounded() + .createQueue()); } /** @@ -46,8 +45,8 @@ public static MultipleFluxSource ofMultiple() { */ public static MultipleFluxSource ofMultiple(int backPressureAfter) { return new MultipleFluxSource( - FluxSource.of(backPressureAfter) - .createQueue()); + FluxSource.of(backPressureAfter) + .createQueue()); } /** @@ -56,8 +55,8 @@ public static MultipleFluxSource ofMultiple(int backPressureAfter) { public static MultipleFluxSource ofMultiple(QueueFactory q) { Objects.requireNonNull(q); return new MultipleFluxSource( - FluxSource.of(q) - .createQueue()); + FluxSource.of(q) + .createQueue()); } /** @@ -116,7 +115,7 @@ public static FluxSource of(int backPressureAfter) { throw new IllegalArgumentException( "Can't apply back pressure after less than 1 event"); return new FluxSource( - backPressureAfter, true); + backPressureAfter, true); } Queue createQueue() { @@ -176,6 +175,7 @@ public PushableStream stream() { q, (Stream) q.stream()); } + /** * Create a pushable Flux * @@ -185,8 +185,9 @@ public PushableStream stream() { public PushableFlux flux() { Queue q = createQueue(); return new PushableFlux( - q, Flux.from(q.stream())); + q, Flux.from(q.stream())); } + /** * Create a pushable ReactiveSeq * @@ -220,6 +221,7 @@ public static ReactiveSeq reactiveSeq(Adapter adapter) { return adapter.stream(); } + /** * Create a pushable ReactiveSeq * diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/control/Publishers.java b/cyclops-reactor/src/main/java/com/aol/cyclops/control/Publishers.java index bd07c797..b609fea9 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/control/Publishers.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/control/Publishers.java @@ -10,7 +10,6 @@ import reactor.core.publisher.Flux; - /** * Utilities for working with reactive-streams Publishers * @@ -39,26 +38,26 @@ public class Publishers { public static AnyMSeq anyM(Publisher flux) { return AnyM.ofSeq(flux); } - + /** * Convert a reactive-streams Publisher to a cyclops-react ReactiveSeq extended Stream type * * @param pub Publisher to convert to a Stream * @return ReactiveSeq */ - public static ReactiveSeq stream(Publisher pub){ + public static ReactiveSeq stream(Publisher pub) { return ReactiveSeq.fromStream(jdkStream(pub)); } - + /** * Convert a reactive-streams Publisher to a plain java.util.Stream * * @param pub Publisher to convert to a Stream * @return Stream */ - public static Stream jdkStream(Publisher pub){ + public static Stream jdkStream(Publisher pub) { SeqSubscriber sub = SeqSubscriber.subscriber(); pub.subscribe(sub); - return StreamSupport.stream(sub.spliterator(),false); + return StreamSupport.stream(sub.spliterator(), false); } } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/control/ReactorPipes.java b/cyclops-reactor/src/main/java/com/aol/cyclops/control/ReactorPipes.java index 8269b343..b0b98f1e 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/control/ReactorPipes.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/control/ReactorPipes.java @@ -1,6 +1,5 @@ package com.aol.cyclops.control; - import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; @@ -45,7 +44,6 @@ public class ReactorPipes { private final ConcurrentMap> registered = new ConcurrentHashMap<>(); - /** * @return Size of registered pipes */ @@ -133,6 +131,7 @@ public Maybe> futureStream(final K key, final LazyReact reac public Maybe> reactiveSeq(final K key) { return get(key).map(a -> a.stream()); } + /** * @param key : Adapter identifier * @return LazyFutureStream from selected Queue @@ -147,8 +146,7 @@ public LazyListX xValues(final K key, final long x) { return get(key).peek(a -> a.stream() .subscribe(sub)) .map(a -> LazyListX.fromStreamS(sub.stream() - .limit(x)) - ) + .limit(x))) .orElse(LazyListX.empty()); } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/FluxTs.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/FluxTs.java index 815d1a8e..1c2c5c8c 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/FluxTs.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/FluxTs.java @@ -25,7 +25,7 @@ */ @UtilityClass public class FluxTs { - + /** * Construct an AnyM type from a Flux. This allows the Flux to be manipulated according to a standard interface * along with a vast array of other Java Monad implementations @@ -47,7 +47,6 @@ public static AnyMSeq anyM(FluxT flux) { return AnyM.ofSeq(flux); } - /** * Construct a FluxT from a Publisher containing Fluxes. * @@ -91,24 +90,23 @@ public static FluxTSeq fluxT(Publisher> nested) { * @param yieldingFunction Generates a result per combination * @return FluxT with an element per combination of nested publishers generated by the yielding function */ - public static FluxT forEach(FluxT value1, - Function> value2, - BiFunction> value3, - TriFunction> value4, - QuadFunction yieldingFunction) { + public static FluxT forEach(FluxT value1, + Function> value2, + BiFunction> value3, + TriFunction> value4, + QuadFunction yieldingFunction) { - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) - .anyM(a -> b -> c -> Publishers.anyM(value4.apply(a, b, c))) - .yield4(yieldingFunction) - .unwrap()) - .unwrap(); + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) + .anyM(a -> b -> c -> Publishers.anyM(value4.apply(a, b, c))) + .yield4(yieldingFunction) + .unwrap()) + .unwrap(); - } - + } - /** + /** * Perform a For Comprehension over a FluxT, accepting 3 generating functions. * This results in a four level nested internal iteration over the provided Publishers. * @@ -129,9 +127,9 @@ public static FluxT forEach(FluxT v //(10, 10, 10, 10) (11, 11, 11, 11) - * - * } - * + * + * } + * * @param value1 top level FluxT * @param value2 Nested publisher * @param value3 Nested publisher @@ -140,24 +138,25 @@ public static FluxT forEach(FluxT v * @param yieldingFunction Generates a result per combination * @return FluxT with an element per combination of nested publishers generated by the yielding function */ - public static FluxT forEach(FluxT value1, - Function> value2, - BiFunction> value3, - TriFunction> value4, - QuadFunction filterFunction, - QuadFunction yieldingFunction) { + public static FluxT forEach(FluxT value1, + Function> value2, + BiFunction> value3, + TriFunction> value4, + QuadFunction filterFunction, + QuadFunction yieldingFunction) { - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) - .anyM(a -> b -> c -> Publishers.anyM(value4.apply(a, b, c))) - .filter(a -> b -> c -> d -> filterFunction.apply(a, b, c, d)) - .yield4(yieldingFunction) - .unwrap()) - .unwrap(); + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) + .anyM(a -> b -> c -> Publishers.anyM(value4.apply(a, b, c))) + .filter(a -> b -> c -> d -> filterFunction.apply(a, b, c, d)) + .yield4(yieldingFunction) + .unwrap()) + .unwrap(); - } - /** + } + + /** * Perform a For Comprehension over a FluxT, accepting 2 generating functions. * This results in three level nested internal iteration over the provided Publishers. * @@ -175,30 +174,31 @@ public static FluxT forEach(FluxT v .forEach(System.out::println); - * - * } - * - * - * @param value1 top level FluxT - * @param value2 Nested publisher - * @param value3 Nested publisher - * @param yieldingFunction Generates a result per combination - * @return FluxT with an element per combination of nested publishers generated by the yielding function - */ - public static FluxT forEach(FluxT value1, - Function> value2, - BiFunction> value3, - TriFunction yieldingFunction) { + * + * } + * + * + * @param value1 top level FluxT + * @param value2 Nested publisher + * @param value3 Nested publisher + * @param yieldingFunction Generates a result per combination + * @return FluxT with an element per combination of nested publishers generated by the yielding function + */ + public static FluxT forEach(FluxT value1, + Function> value2, + BiFunction> value3, + TriFunction yieldingFunction) { + + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) + .yield3(yieldingFunction) + .unwrap()) + .unwrap(); - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) - .yield3(yieldingFunction) - .unwrap()) - .unwrap(); + } - } - /** + /** * Perform a For Comprehension over a FluxT, accepting 2 generating functions. * This results in a three level nested internal iteration over the provided Publishers. * @@ -215,10 +215,10 @@ public static FluxT forEach(FluxT value1, (a,b,c)->a+b+c<102, Tuple::tuple) .forEach(System.out::println); - - * - * } - * + + * + * } + * * @param value1 top level FluxT * @param value2 Nested publisher * @param value3 Nested publisher @@ -226,60 +226,61 @@ public static FluxT forEach(FluxT value1, * @param yieldingFunction Generates a result per combination * @return FluxT with an element per combination of nested publishers generated by the yielding function */ - public static FluxT forEach(FluxT value1, - Function> value2, - BiFunction> value3, - TriFunction filterFunction, - TriFunction yieldingFunction) { + public static FluxT forEach(FluxT value1, + Function> value2, + BiFunction> value3, + TriFunction filterFunction, + TriFunction yieldingFunction) { - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) - .filter(a -> b -> c -> filterFunction.apply(a, b, c)) - .yield3(yieldingFunction) - .unwrap()) - .unwrap(); + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) + .filter(a -> b -> c -> filterFunction.apply(a, b, c)) + .yield3(yieldingFunction) + .unwrap()) + .unwrap(); - } + } - /** - * Perform a For Comprehension over a FluxT, accepting a generating function. - * This results in two level nested internal iteration over the provided Publishers. - * - *
-   * {@code
-   *    
-   *   import static com.aol.cyclops.reactor.FluxTs.forEach;
-   *   
-   *    FluxT fluxT = FluxT.fromIterable(Arrays.asList(Flux.range(10,2),Flux.range(100,2)));
-   *    
+    /**
+     * Perform a For Comprehension over a FluxT, accepting a generating function. 
+     * This results in two level nested internal iteration over the provided Publishers.
+     * 
+     *  
+     * {@code
+     *    
+     *   import static com.aol.cyclops.reactor.FluxTs.forEach;
+     *   
+     *    FluxT fluxT = FluxT.fromIterable(Arrays.asList(Flux.range(10,2),Flux.range(100,2)));
+     *    
        forEach(fluxT, 
                 a-> ReactiveSeq.iterate(a,i->i+1).limit(2),
              Tuple::tuple)
              .forEach(System.out::println);
              
         
-  * 
-  * }
-  * 
- * - * @param value1 top level FluxT - * @param value2 Nested publisher - * @param value3 Nested publisher - * @param yieldingFunction Generates a result per combination - * @return FluxT with an element per combination of nested publishers generated by the yielding function - */ - public static FluxT forEach(FluxT value1, Function> value2, - BiFunction yieldingFunction) { + * + * } + *
+ * + * @param value1 top level FluxT + * @param value2 Nested publisher + * @param value3 Nested publisher + * @param yieldingFunction Generates a result per combination + * @return FluxT with an element per combination of nested publishers generated by the yielding function + */ + public static FluxT forEach(FluxT value1, Function> value2, + BiFunction yieldingFunction) { + + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .yield2(yieldingFunction) + .unwrap()) + .unwrap(); - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .yield2(yieldingFunction) - .unwrap()) - .unwrap(); + } - } - /** + /** * Perform a For Comprehension over a FluxT, accepting a generating function. * This results in a two level nested internal iteration over the provided Publishers. * @@ -295,10 +296,10 @@ public static FluxT forEach(FluxT value1, Functiona+b<102, Tuple::tuple) .forEach(System.out::println); - - * - * } - * + + * + * } + * * @param value1 top level FluxT * @param value2 Nested publisher * @param value3 Nested publisher @@ -306,17 +307,18 @@ public static FluxT forEach(FluxT value1, Function FluxT forEach(FluxT value1, Function> value2, - BiFunction filterFunction, - BiFunction yieldingFunction) { + public static FluxT forEach(FluxT value1, + Function> value2, + BiFunction filterFunction, + BiFunction yieldingFunction) { - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .filter(a -> b -> filterFunction.apply(a, b)) - .yield2(yieldingFunction) - .unwrap()) - .unwrap(); + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .filter(a -> b -> filterFunction.apply(a, b)) + .yield2(yieldingFunction) + .unwrap()) + .unwrap(); - } + } } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Fluxes.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Fluxes.java index c09364a7..65d037c4 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Fluxes.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Fluxes.java @@ -914,7 +914,7 @@ public T next() { * @return Non-empty Flux */ public static Flux onEmpty(Flux flux, T value) { - + return Flux.fromIterable(() -> new Iterator() { Iterator it; diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/MonoTs.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/MonoTs.java index 95639ccc..adc3ecf7 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/MonoTs.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/MonoTs.java @@ -26,7 +26,7 @@ */ @UtilityClass public class MonoTs { - + /** * Construct an AnyM type from a Mono. This allows the Mono to be manipulated according to a standard interface * along with a vast array of other Java Monad implementations @@ -48,7 +48,6 @@ public static AnyMSeq anyM(MonoT mono) { return AnyM.ofSeq(mono); } - /** * Construct a MonoT from a Publisher containing Monos. * @@ -92,24 +91,23 @@ public static MonoTSeq monoT(Publisher> nested) { * @param yieldingFunction Generates a result per combination * @return MonoTSeq with an element per combination of nested publishers generated by the yielding function */ - public static MonoT forEach(MonoT value1, - Function> value2, - BiFunction> value3, - TriFunction> value4, - QuadFunction yieldingFunction) { + public static MonoT forEach(MonoT value1, + Function> value2, + BiFunction> value3, + TriFunction> value4, + QuadFunction yieldingFunction) { - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) - .anyM(a -> b -> c -> Publishers.anyM(value4.apply(a, b, c))) - .yield4(yieldingFunction) - .unwrap()) - .unwrap(); + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) + .anyM(a -> b -> c -> Publishers.anyM(value4.apply(a, b, c))) + .yield4(yieldingFunction) + .unwrap()) + .unwrap(); - } - + } - /** + /** * Perform a For Comprehension over a MonoT, accepting 3 generating functions. * This results in a four level nested internal iteration over the provided Publishers. * @@ -130,9 +128,9 @@ public static MonoT forEach(MonoT v //(10, 10, 10, 10) (11, 11, 11, 11) - * - * } - * + * + * } + * * @param value1 top level MonoT * @param value2 Nested publisher * @param value3 Nested publisher @@ -141,24 +139,25 @@ public static MonoT forEach(MonoT v * @param yieldingFunction Generates a result per combination * @return */ - public static MonoT forEach(MonoT value1, - Function> value2, - BiFunction> value3, - TriFunction> value4, - QuadFunction filterFunction, - QuadFunction yieldingFunction) { + public static MonoT forEach(MonoT value1, + Function> value2, + BiFunction> value3, + TriFunction> value4, + QuadFunction filterFunction, + QuadFunction yieldingFunction) { - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) - .anyM(a -> b -> c -> Publishers.anyM(value4.apply(a, b, c))) - .filter(a -> b -> c -> d -> filterFunction.apply(a, b, c, d)) - .yield4(yieldingFunction) - .unwrap()) - .unwrap(); + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) + .anyM(a -> b -> c -> Publishers.anyM(value4.apply(a, b, c))) + .filter(a -> b -> c -> d -> filterFunction.apply(a, b, c, d)) + .yield4(yieldingFunction) + .unwrap()) + .unwrap(); - } - /** + } + + /** * Perform a For Comprehension over a MonoT, accepting 2 generating functions. * This results in three level nested internal iteration over the provided Publishers. * @@ -176,30 +175,31 @@ public static MonoT forEach(MonoT v .forEach(System.out::println); - * - * } - * - * - * @param value1 top level MonoT - * @param value2 Nested publisher - * @param value3 Nested publisher - * @param yieldingFunction Generates a result per combination - * @return MonoTSeq with an element per combination of nested publishers generated by the yielding function - */ - public static MonoT forEach(MonoT value1, - Function> value2, - BiFunction> value3, - TriFunction yieldingFunction) { + * + * } + * + * + * @param value1 top level MonoT + * @param value2 Nested publisher + * @param value3 Nested publisher + * @param yieldingFunction Generates a result per combination + * @return MonoTSeq with an element per combination of nested publishers generated by the yielding function + */ + public static MonoT forEach(MonoT value1, + Function> value2, + BiFunction> value3, + TriFunction yieldingFunction) { + + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) + .yield3(yieldingFunction) + .unwrap()) + .unwrap(); - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) - .yield3(yieldingFunction) - .unwrap()) - .unwrap(); + } - } - /** + /** * Perform a For Comprehension over a MonoT, accepting 2 generating functions. * This results in a three level nested internal iteration over the provided Publishers. * @@ -216,10 +216,10 @@ public static MonoT forEach(MonoT value1, (a,b,c,d)->a+b+c+d<102, Tuple::tuple) .forEach(System.out::println); - - * - * } - * + + * + * } + * * @param value1 top level MonoT * @param value2 Nested publisher * @param value3 Nested publisher @@ -227,60 +227,61 @@ public static MonoT forEach(MonoT value1, * @param yieldingFunction Generates a result per combination * @return MonoTSeq with an element per combination of nested publishers generated by the yielding function */ - public static MonoT forEach(MonoT value1, - Function> value2, - BiFunction> value3, - TriFunction filterFunction, - TriFunction yieldingFunction) { + public static MonoT forEach(MonoT value1, + Function> value2, + BiFunction> value3, + TriFunction filterFunction, + TriFunction yieldingFunction) { - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) - .filter(a -> b -> c -> filterFunction.apply(a, b, c)) - .yield3(yieldingFunction) - .unwrap()) - .unwrap(); + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .anyM(a -> b -> Publishers.anyM(value3.apply(a, b))) + .filter(a -> b -> c -> filterFunction.apply(a, b, c)) + .yield3(yieldingFunction) + .unwrap()) + .unwrap(); - } + } - /** - * Perform a For Comprehension over a MonoT, accepting a generating function. - * This results in two level nested internal iteration over the provided Publishers. - * - *
-   * {@code
-   *    
-   *   import static com.aol.cyclops.reactor.MonoTs.forEach;
-   *   
-   *    MonoT monoT = MonoT.fromIterable(Arrays.asList(Flux.range(10,2),Flux.range(100,2)));
-   *    
+    /**
+     * Perform a For Comprehension over a MonoT, accepting a generating function. 
+     * This results in two level nested internal iteration over the provided Publishers.
+     * 
+     *  
+     * {@code
+     *    
+     *   import static com.aol.cyclops.reactor.MonoTs.forEach;
+     *   
+     *    MonoT monoT = MonoT.fromIterable(Arrays.asList(Flux.range(10,2),Flux.range(100,2)));
+     *    
        forEach(monoT, 
                 a-> ReactiveSeq.iterate(a,i->i+1).limit(2),
              Tuple::tuple)
              .forEach(System.out::println);
              
         
-  * 
-  * }
-  * 
- * - * @param value1 top level MonoT - * @param value2 Nested publisher - * @param value3 Nested publisher - * @param yieldingFunction Generates a result per combination - * @return MonoTSeq with an element per combination of nested publishers generated by the yielding function - */ - public static MonoT forEach(MonoT value1, Function> value2, - BiFunction yieldingFunction) { + * + * } + *
+ * + * @param value1 top level MonoT + * @param value2 Nested publisher + * @param value3 Nested publisher + * @param yieldingFunction Generates a result per combination + * @return MonoTSeq with an element per combination of nested publishers generated by the yielding function + */ + public static MonoT forEach(MonoT value1, Function> value2, + BiFunction yieldingFunction) { + + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .yield2(yieldingFunction) + .unwrap()) + .unwrap(); - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .yield2(yieldingFunction) - .unwrap()) - .unwrap(); + } - } - /** + /** * Perform a For Comprehension over a MonoT, accepting a generating function. * This results in a two level nested internal iteration over the provided Publishers. * @@ -296,10 +297,10 @@ public static MonoT forEach(MonoT value1, Functiona+b+c+d<102, Tuple::tuple) .forEach(System.out::println); - - * - * } - * + + * + * } + * * @param value1 top level MonoT * @param value2 Nested publisher * @param value3 Nested publisher @@ -307,17 +308,18 @@ public static MonoT forEach(MonoT value1, Function MonoT forEach(MonoT value1, Function> value2, - BiFunction filterFunction, - BiFunction yieldingFunction) { + public static MonoT forEach(MonoT value1, + Function> value2, + BiFunction filterFunction, + BiFunction yieldingFunction) { - return AnyM.ofSeq(For.anyM(anyM(value1)) - .anyM(a -> Publishers.anyM(value2.apply(a))) - .filter(a -> b -> filterFunction.apply(a, b)) - .yield2(yieldingFunction) - .unwrap()) - .unwrap(); + return AnyM.ofSeq(For.anyM(anyM(value1)) + .anyM(a -> Publishers.anyM(value2.apply(a))) + .filter(a -> b -> filterFunction.apply(a, b)) + .yield2(yieldingFunction) + .unwrap()) + .unwrap(); - } + } } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Monos.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Monos.java index 7046a43f..b28ecc2b 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Monos.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Monos.java @@ -48,7 +48,7 @@ public class Monos { public static AnyMValue mono(Mono mono) { return AnyM.ofValue(mono); } - + /** * Perform a For Comprehension over a Mono, accepting 3 generating functions. * This results in a four level nested internal iteration over the provided Monos. @@ -172,6 +172,7 @@ public static Mono forEach(Mono value1, .unwrap(); } + /** * * Perform a For Comprehension over a Mono, accepting 2 generating functions. @@ -213,6 +214,7 @@ public static Mono forEach(Mono value1, .unwrap(); } + /** * Perform a For Comprehension over a Mono, accepting a generating function. * This results in a two level nested internal iteration over the provided Monos. @@ -244,6 +246,7 @@ public static Mono forEach(Mono value1, Function Mono forEach(Mono value1, Function Mono forEach(Mono value1, Function Mono combine(Mono mono,Value app, BiFunction fn){ - return Mono.from(FutureW.of(mono.toFuture()).combine(app, fn)); + public static Mono combine(Mono mono, Value app, + BiFunction fn) { + return Mono.from(FutureW.of(mono.toFuture()) + .combine(app, fn)); } + /** * Lazily combine this Mono with the supplied Mono via the supplied BiFunction * @@ -301,9 +307,12 @@ public static Mono combine(Mono mono,Value Mono combine(Mono mono,Mono app, BiFunction fn){ - return Mono.from(FutureW.of(mono.toFuture()).combine(FutureW.of(app.toFuture()), fn)); + public static Mono combine(Mono mono, Mono app, + BiFunction fn) { + return Mono.from(FutureW.of(mono.toFuture()) + .combine(FutureW.of(app.toFuture()), fn)); } + /** * Combine the provided Mono with the first element (if present) in the provided Iterable using the provided BiFunction * @@ -312,9 +321,12 @@ public static Mono combine(Mono mono,Mono Mono zip(Mono mono,Iterable app, BiFunction fn){ - return Mono.from(FutureW.of(mono.toFuture()).zip(app, fn)); + public static Mono zip(Mono mono, Iterable app, + BiFunction fn) { + return Mono.from(FutureW.of(mono.toFuture()) + .zip(app, fn)); } + /** * Combine the provided Mono with the first element (if present) in the provided Publisher using the provided BiFunction * @@ -323,9 +335,12 @@ public static Mono zip(Mono mono,Iterable Mono zip(Mono mono,BiFunction fn, Publisher app){ - return Mono.from(FutureW.of(mono.toFuture()).zip(fn,app)); + public static Mono zip(Mono mono, BiFunction fn, + Publisher app) { + return Mono.from(FutureW.of(mono.toFuture()) + .zip(fn, app)); } + /** * Test if value is equal to the value inside this Mono * @@ -333,27 +348,29 @@ public static Mono zip(Mono mono,BiFunction boolean test(Mono mono,T test){ - return FutureW.of(mono.toFuture()).test(test); + public static boolean test(Mono mono, T test) { + return FutureW.of(mono.toFuture()) + .test(test); } - + /** * Construct a Mono from Iterable by taking the first value from Iterable * * @param t Iterable to populate Mono from * @return Mono containing first element from Iterable (or empty Mono) */ - public static Mono fromIterable(Iterable t){ + public static Mono fromIterable(Iterable t) { return Mono.from(Flux.fromIterable(t)); } + /** * Get an Iterator for the value (if any) in the provided Mono * * @param pub Mono to get Iterator for * @return Iterator over Mono value */ - public static Iterator iterator(Mono pub){ - + public static Iterator iterator(Mono pub) { + ValueSubscriber sub = ValueSubscriber.subscriber(); pub.subscribe(sub); return sub.iterator(); diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/AbstractFluentCollectionX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/AbstractFluentCollectionX.java index 1c82a0f6..41fa2c99 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/AbstractFluentCollectionX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/AbstractFluentCollectionX.java @@ -93,8 +93,11 @@ public C get() { } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollection#stream() + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * LazyFluentCollection#stream() */ @Override public Flux flux() { @@ -104,20 +107,30 @@ public Flux flux() { } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.reactor.types.ReactorConvertable#flux() */ @Override abstract public Flux flux(); - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#stream(reactor.core.publisher.Flux) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #stream(reactor.core.publisher.Flux) */ @Override abstract public FluentCollectionX stream(Flux stream); - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusLazy(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusLazy(java.lang.Object) */ @Override public LazyFluentCollectionX plusLazy(final T e) { @@ -126,8 +139,12 @@ public LazyFluentCollectionX plusLazy(final T e) { } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plus(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plus(java.lang.Object) */ @Override public FluentCollectionX plus(final T e) { @@ -135,8 +152,12 @@ public FluentCollectionX plus(final T e) { return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusAll(java.util.Collection) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusAll(java.util.Collection) */ @Override public FluentCollectionX plusAll(final Collection list) { @@ -144,8 +165,12 @@ public FluentCollectionX plusAll(final Collection list) { return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#minus(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #minus(java.lang.Object) */ @Override public FluentCollectionX minus(final Object e) { @@ -153,8 +178,12 @@ public FluentCollectionX minus(final Object e) { return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#minusAll(java.util.Collection) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #minusAll(java.util.Collection) */ @Override public FluentCollectionX minusAll(final Collection list) { @@ -197,19 +226,25 @@ public LazyFluentCollectionX minusLazy(final Object e) { */ @Override public LazyFluentCollectionX minusAllLazy(final Collection list) { - return(LazyFluentCollectionX) this.removeAll((Iterable) list); + return (LazyFluentCollectionX) this.removeAll((Iterable) list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#combine(java.util + * .function.BiPredicate, java.util.function.BinaryOperator) */ @Override public FluentCollectionX combine(final BiPredicate predicate, final BinaryOperator op) { return stream(Fluxes.combine(flux(), predicate, op)); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.CollectionX#reverse() */ @Override @@ -217,31 +252,45 @@ public FluentCollectionX reverse() { return stream(Fluxes.reverse(flux())); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#filter(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#filter(java.util. + * function.Predicate) */ @Override public FluentCollectionX filter(final Predicate pred) { return stream(flux().filter(pred)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#map(java.util.function.Function) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#map(java.util. + * function.Function) */ @Override public CollectionX map(final Function mapper) { return stream(flux().map(mapper)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#flatMap(java.util.function.Function) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#flatMap(java.util + * .function.Function) */ @Override public CollectionX flatMap(final Function> mapper) { return stream(flux().flatMap(mapper.andThen(ReactiveSeq::fromIterable))); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.CollectionX#limit(long) */ @Override @@ -249,7 +298,9 @@ public FluentCollectionX limit(final long num) { return stream(flux().take(num)); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.CollectionX#skip(long) */ @Override @@ -257,48 +308,70 @@ public FluentCollectionX skip(final long num) { return stream(flux().skip(num)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#takeRight(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#takeRight(int) */ @Override public FluentCollectionX takeRight(final int num) { return stream(flux().takeLast(num)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#dropRight(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#dropRight(int) */ @Override public FluentCollectionX dropRight(final int num) { return stream(flux().skipLast(num)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#takeWhile(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#takeWhile(java. + * util.function.Predicate) */ @Override public FluentCollectionX takeWhile(final Predicate p) { return stream(flux().takeWhile(p)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#dropWhile(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#dropWhile(java. + * util.function.Predicate) */ @Override public FluentCollectionX dropWhile(final Predicate p) { return stream(flux().skipWhile(p)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#takeUntil(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#takeUntil(java. + * util.function.Predicate) */ @Override public FluentCollectionX takeUntil(final Predicate p) { return stream(Fluxes.takeUntil(flux(), p)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#dropUntil(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#dropUntil(java. + * util.function.Predicate) */ @Override public FluentCollectionX dropUntil(final Predicate p) { @@ -307,7 +380,10 @@ public FluentCollectionX dropUntil(final Predicate p) { /* * (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.CollectionX#trampoline(java.util.function.Function) + * + * @see + * com.aol.cyclops.data.collections.extensions.CollectionX#trampoline(java. + * util.function.Function) */ @Override public FluentCollectionX trampoline(final Function> mapper) { @@ -396,7 +472,7 @@ public FluentCollectionX zip(final Iterable other, @Override public FluentCollectionX> sliding(final int windowSize) { return stream(Fluxes.sliding(flux(), windowSize, 1) - .map(ListX::fromPublisher)); + .map(ListX::fromPublisher)); } /* @@ -408,7 +484,7 @@ public FluentCollectionX> sliding(final int windowSize) { @Override public FluentCollectionX> sliding(final int windowSize, final int increment) { return stream(Fluxes.sliding(flux(), windowSize, increment) - .map(ListX::fromPublisher)); + .map(ListX::fromPublisher)); } /* diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/LazyFluentCollection.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/LazyFluentCollection.java index 3182b547..9a1c2086 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/LazyFluentCollection.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/LazyFluentCollection.java @@ -12,13 +12,13 @@ * @param the type of elements held in the wrapped collection * @param The wrapped Collection type */ -public interface LazyFluentCollection> { - +public interface LazyFluentCollection> { + /** * @return Wrapped Collection */ C get(); - + /** * @return Collection data inside a stream - a Reactor Flux */ diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/LazyFluentCollectionX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/LazyFluentCollectionX.java index 54fdee76..16b3357d 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/LazyFluentCollectionX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/base/LazyFluentCollectionX.java @@ -16,7 +16,7 @@ * @param the type of elements held in this collection */ public interface LazyFluentCollectionX extends FluentCollectionX { - + /** * Create a LazyFluentCollection from a Flux. * The created LazyFluentCollection will be of the same type as the object this method is called on. @@ -36,13 +36,13 @@ public interface LazyFluentCollectionX extends FluentCollectionX { * The same collection / reduction method will be used in the newly created Object. I.e. Calling stream(Flux) on * a collection which as an Immutable Collector will result in an Immutable Collection. * - + * * @param stream Flux to create new collection from * @return New collection from Flux */ FluentCollectionX stream(Flux stream); - + /** * Lazily add an element to this Collection. * The Collection will not be materialized (unlike via @see {@link LazyFluentCollectionX#plus(Object)} @@ -59,11 +59,11 @@ public interface LazyFluentCollectionX extends FluentCollectionX { * @param e Element to add * @return LazyFluentCollectionX with element added */ - default LazyFluentCollectionX plusLazy(T e){ + default LazyFluentCollectionX plusLazy(T e) { add(e); return this; } - + /** * Lazily add all the elements in the supplied Collection to this Collection. * The Collection will not be materialized (unlike via @see {@link LazyFluentCollectionX#plusAll(Object)} @@ -79,11 +79,11 @@ default LazyFluentCollectionX plusLazy(T e){ * @param col Collection to add * @return LazyFluentCollectionX with Collection added */ - default LazyFluentCollectionX plusAllLazy(Collection col){ + default LazyFluentCollectionX plusAllLazy(Collection col) { addAll(col); return this; } - + /** * Lazily remove an element from this Collection. * The Collection will not be materialized (unlike via @see {@link LazyFluentCollectionX#minus(Object)} @@ -111,11 +111,11 @@ default LazyFluentCollectionX plusAllLazy(Collection col){ * @param e Element to remove * @return LazyFluentCollectionX with element removed */ - default LazyFluentCollectionX minusLazy(Object e){ + default LazyFluentCollectionX minusLazy(Object e) { remove(e); return this; } - + /** * Lazily remove the elements in the supplied Collection from this Collection. * The Collection will not be materialized (unlike via @see {@link LazyFluentCollectionX#minusAll(Collection)} @@ -142,46 +142,70 @@ default LazyFluentCollectionX minusLazy(Object e){ * @param list of elements to remove * @return LazyFluentCollectionX with elements removed */ - default LazyFluentCollectionX minusAllLazy(Collection list){ + default LazyFluentCollectionX minusAllLazy(Collection list) { removeAll(list); return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.FluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.FluentCollectionX#plusInOrder + * (java.lang.Object) */ @Override - default FluentCollectionX plusInOrder(T e){ + default FluentCollectionX plusInOrder(T e) { return plus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.FluentCollectionX#plus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.FluentCollectionX#plus(java. + * lang.Object) */ @Override public FluentCollectionX plus(T e); - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.FluentCollectionX#plusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.FluentCollectionX#plusAll( + * java.util.Collection) */ @Override - public FluentCollectionX plusAll(Collection list) ; - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.FluentCollectionX#minus(java.lang.Object) + public FluentCollectionX plusAll(Collection list); + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.FluentCollectionX#minus(java. + * lang.Object) */ @Override public FluentCollectionX minus(Object e); - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.FluentCollectionX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.FluentCollectionX#minusAll( + * java.util.Collection) */ @Override public FluentCollectionX minusAll(Collection list); - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.FluentCollectionX#unit(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.FluentCollectionX#unit(java. + * util.Collection) */ @Override public FluentCollectionX unit(Collection col); } - diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPBagX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPBagX.java index 921b0b9f..e017fdd6 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPBagX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPBagX.java @@ -44,6 +44,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; import reactor.core.publisher.Flux; + /** * An extended Bag type * This makes use of PBag (@see org.pcollections.PBag) from PCollectons. @@ -72,24 +73,23 @@ * * @param the type of elements held in this collection */ -@AllArgsConstructor(access=AccessLevel.PRIVATE) -public class LazyPBagX extends AbstractFluentCollectionX implements PBagX { - private final LazyFluentCollection> lazy; +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class LazyPBagX extends AbstractFluentCollectionXimplements PBagX { + private final LazyFluentCollection> lazy; @Getter private final Reducer> collector; - - - /** * Create a LazyPStackX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyPStackX */ - public static LazyPBagX fromStreamS(Stream stream){ - return new LazyPBagX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyPBagX fromStreamS(Stream stream) { + return new LazyPBagX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyPStackX that contains the Integers between start and end * @@ -145,7 +145,7 @@ public static LazyPBagX unfold(U seed, Function LazyPBagX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -158,10 +158,9 @@ public static LazyPBagX generate(long limit, Supplier s) { */ public static LazyPBagX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyPStackX */ @@ -169,14 +168,13 @@ public static LazyPBagX iterate(long limit, final T seed, final UnaryOper return Collectors.toCollection(() -> LazyPBagX.of()); } - - /** * @return An empty LazyPStackX */ public static LazyPBagX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -197,8 +195,9 @@ public static LazyPBagX empty() { */ @SafeVarargs public static LazyPBagX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -252,42 +251,54 @@ public static LazyPBagX fromIterable(Iterable it) { public static LazyPBagX fromIterable(Reducer> collector, Iterable it) { if (it instanceof LazyPBagX) return (LazyPBagX) it; - + if (it instanceof PBag) return new LazyPBagX( (PBag) it, collector); - + return new LazyPBagX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazyPBagX(PBag list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPBagX(PBag list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - private LazyPBagX(boolean efficientOps,PBag list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPBagX(boolean efficientOps, PBag list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - - private LazyPBagX(PBag list){ + + private LazyPBagX(PBag list) { this.collector = Reducers.toPBag(); - this.lazy = new PersistentLazyCollection>(list,null,Reducers.toPBag()); + this.lazy = new PersistentLazyCollection>( + list, null, Reducers.toPBag()); } - private LazyPBagX(Flux stream,Reducer> collector){ + + private LazyPBagX(Flux stream, Reducer> collector) { this.collector = collector; - this.lazy = new PersistentLazyCollection<>(null,stream,Reducers.toPBag()); + this.lazy = new PersistentLazyCollection<>( + null, stream, Reducers.toPBag()); } - private LazyPBagX(Flux stream){ + + private LazyPBagX(Flux stream) { this.collector = Reducers.toPBag(); - this.lazy = new PersistentLazyCollection<>(null,stream,collector); + this.lazy = new PersistentLazyCollection<>( + null, stream, collector); } - private LazyPBagX(){ + + private LazyPBagX() { this.collector = Reducers.toPBag(); - this.lazy = new PersistentLazyCollection<>((PBag)this.collector.zero(),null,collector); + this.lazy = new PersistentLazyCollection<>( + (PBag) this.collector.zero(), null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -295,7 +306,9 @@ public void forEach(Consumer action) { getBag().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -303,7 +316,9 @@ public Iterator iterator() { return getBag().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -311,7 +326,9 @@ public int size() { return getBag().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -319,7 +336,9 @@ public boolean contains(Object e) { return getBag().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -327,9 +346,9 @@ public boolean equals(Object o) { return getBag().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -337,7 +356,9 @@ public boolean isEmpty() { return getBag().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -345,7 +366,9 @@ public int hashCode() { return getBag().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -353,7 +376,9 @@ public Object[] toArray() { return getBag().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -361,7 +386,9 @@ public boolean removeAll(Collection c) { return getBag().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -369,7 +396,9 @@ public T[] toArray(T[] a) { return getBag().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -377,7 +406,9 @@ public boolean add(T e) { return getBag().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -385,7 +416,9 @@ public boolean remove(Object o) { return getBag().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -393,7 +426,9 @@ public boolean containsAll(Collection c) { return getBag().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -401,7 +436,9 @@ public boolean addAll(Collection c) { return getBag().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -409,7 +446,9 @@ public boolean retainAll(Collection c) { return getBag().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -417,8 +456,9 @@ public void clear() { getBag().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -426,7 +466,9 @@ public String toString() { return getBag().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -434,847 +476,1103 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getBag().removeIf(filter); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getBag().parallelStream(); } - - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getBag().spliterator(); } - + /** * @return PQueue */ private PBag getBag() { return lazy.get(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyPBagX stream(Flux stream){ - return new LazyPBagX(stream); + public LazyPBagX stream(Flux stream) { + return new LazyPBagX( + stream); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flux() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flux() */ @Override public Flux flux() { return lazy.flux(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combine(java.util.function.BiPredicate, + * java.util.function.BinaryOperator) */ @Override public LazyPBagX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyPBagX)super.combine(predicate, op); + + return (LazyPBagX) super.combine(predicate, op); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#reverse() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#reverse() */ @Override public LazyPBagX reverse() { - - return(LazyPBagX)super.reverse(); + + return (LazyPBagX) super.reverse(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filter(java.util.function.Predicate) */ @Override public LazyPBagX filter(Predicate pred) { - - return (LazyPBagX)super.filter(pred); + + return (LazyPBagX) super.filter(pred); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#map(java.util.function.Function) */ @Override public LazyPBagX map(Function mapper) { - - return (LazyPBagX)super.map(mapper); + + return (LazyPBagX) super.map(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flatMap(java.util.function.Function) */ @Override public LazyPBagX flatMap(Function> mapper) { - return (LazyPBagX)super.flatMap(mapper); + return (LazyPBagX) super.flatMap(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limit(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limit(long) */ @Override public LazyPBagX limit(long num) { - return (LazyPBagX)super.limit(num); + return (LazyPBagX) super.limit(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skip(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skip(long) */ @Override public LazyPBagX skip(long num) { - return (LazyPBagX)super.skip(num); + return (LazyPBagX) super.skip(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeRight(int) */ @Override public LazyPBagX takeRight(int num) { - return (LazyPBagX)super.takeRight(num); + return (LazyPBagX) super.takeRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropRight(int) */ @Override public LazyPBagX dropRight(int num) { - return (LazyPBagX)super.dropRight(num); + return (LazyPBagX) super.dropRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) */ @Override public LazyPBagX takeWhile(Predicate p) { - return (LazyPBagX)super.takeWhile(p); + return (LazyPBagX) super.takeWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) */ @Override public LazyPBagX dropWhile(Predicate p) { - return (LazyPBagX)super.dropWhile(p); + return (LazyPBagX) super.dropWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) */ @Override public LazyPBagX takeUntil(Predicate p) { - return (LazyPBagX)super.takeUntil(p); + return (LazyPBagX) super.takeUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) */ @Override public LazyPBagX dropUntil(Predicate p) { - return(LazyPBagX)super.dropUntil(p); + return (LazyPBagX) super.dropUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#trampoline(java.util.function.Function) */ @Override public LazyPBagX trampoline(Function> mapper) { - return (LazyPBagX)super.trampoline(mapper); + return (LazyPBagX) super.trampoline(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#slice(long, long) */ @Override public LazyPBagX slice(long from, long to) { - return (LazyPBagX)super.slice(from, to); + return (LazyPBagX) super.slice(from, to); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int) */ @Override public LazyPBagX> grouped(int groupSize) { - - return (LazyPBagX>)super.grouped(groupSize); + + return (LazyPBagX>) super.grouped(groupSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function, + * java.util.stream.Collector) */ @Override public LazyPBagX> grouped(Function classifier, Collector downstream) { - - return (LazyPBagX)super.grouped(classifier, downstream); + + return (LazyPBagX) super.grouped(classifier, downstream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function) */ @Override public LazyPBagX>> grouped(Function classifier) { - - return (LazyPBagX)super.grouped(classifier); + + return (LazyPBagX) super.grouped(classifier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable) */ @Override public LazyPBagX> zip(Iterable other) { - - return (LazyPBagX)super.zip(other); + + return (LazyPBagX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable, + * java.util.function.BiFunction) */ @Override public LazyPBagX zip(Iterable other, BiFunction zipper) { - - return (LazyPBagX)super.zip(other, zipper); + + return (LazyPBagX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int) */ @Override public LazyPBagX> sliding(int windowSize) { - - return (LazyPBagX>)super.sliding(windowSize); + + return (LazyPBagX>) super.sliding(windowSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int, int) */ @Override public LazyPBagX> sliding(int windowSize, int increment) { - - return (LazyPBagX>)super.sliding(windowSize, increment); + + return (LazyPBagX>) super.sliding(windowSize, increment); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) */ @Override public LazyPBagX scanLeft(Monoid monoid) { - - return (LazyPBagX)super.scanLeft(monoid); + + return (LazyPBagX) super.scanLeft(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPBagX scanLeft(U seed, BiFunction function) { - + return (LazyPBagX) super.scanLeft(seed, function); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) */ @Override public LazyPBagX scanRight(Monoid monoid) { - - return (LazyPBagX)super.scanRight(monoid); + + return (LazyPBagX) super.scanRight(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPBagX scanRight(U identity, BiFunction combiner) { - - return (LazyPBagX)super.scanRight(identity, combiner); + + return (LazyPBagX) super.scanRight(identity, combiner); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.function.Function) */ @Override public > LazyPBagX sorted(Function function) { - - return (LazyPBagX)super.sorted(function); + + return (LazyPBagX) super.sorted(function); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusLazy(java.lang.Object) */ @Override public LazyPBagX plusLazy(T e) { - - return (LazyPBagX)super.plusLazy(e); + + return (LazyPBagX) super.plusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusAllLazy(java.util.Collection) */ @Override public LazyPBagX plusAllLazy(Collection list) { - - return (LazyPBagX)super.plusAllLazy(list); + + return (LazyPBagX) super.plusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusLazy(java.lang.Object) */ @Override public LazyPBagX minusLazy(Object e) { - - return (LazyPBagX)super.minusLazy(e); + + return (LazyPBagX) super.minusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAllLazy(java.util.Collection) */ @Override public LazyPBagX minusAllLazy(Collection list) { - - return (LazyPBagX)super.minusAllLazy(list); + + return (LazyPBagX) super.minusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(int) */ @Override public LazyPBagX cycle(int times) { - return (LazyPBagX)super.cycle(times); + return (LazyPBagX) super.cycle(times); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) */ @Override public LazyPBagX cycle(Monoid m, int times) { - return (LazyPBagX)super.cycle(m,times); + return (LazyPBagX) super.cycle(m, times); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) */ @Override public LazyPBagX cycleWhile(Predicate predicate) { - return (LazyPBagX)super.cycleWhile(predicate); + return (LazyPBagX) super.cycleWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) */ @Override public LazyPBagX cycleUntil(Predicate predicate) { - return (LazyPBagX)super.cycleUntil(predicate); + return (LazyPBagX) super.cycleUntil(predicate); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) */ @Override public LazyPBagX> zip(Seq other) { - - return (LazyPBagX)super.zip(other); + + return (LazyPBagX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip3(java.util.stream.Stream, + * java.util.stream.Stream) */ @Override public LazyPBagX> zip3(Stream second, Stream third) { - - return (LazyPBagX)super.zip3(second, third); + + return (LazyPBagX) super.zip3(second, third); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip4(java.util.stream.Stream, + * java.util.stream.Stream, java.util.stream.Stream) */ @Override public LazyPBagX> zip4(Stream second, Stream third, Stream fourth) { - - return (LazyPBagX)super.zip4(second, third, fourth); + + return (LazyPBagX) super.zip4(second, third, fourth); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zipWithIndex() */ @Override public LazyPBagX> zipWithIndex() { - - return (LazyPBagX>)super.zipWithIndex(); + + return (LazyPBagX>) super.zipWithIndex(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#distinct() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#distinct() */ @Override public LazyPBagX distinct() { - - return (LazyPBagX)super.distinct(); + + return (LazyPBagX) super.distinct(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted() */ @Override public LazyPBagX sorted() { - - return (LazyPBagX)super.sorted(); + + return (LazyPBagX) super.sorted(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.Comparator) */ @Override public LazyPBagX sorted(Comparator c) { - - return (LazyPBagX)super.sorted(c); + + return (LazyPBagX) super.sorted(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) */ @Override public LazyPBagX skipWhile(Predicate p) { - - return (LazyPBagX)super.skipWhile(p); + + return (LazyPBagX) super.skipWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) */ @Override public LazyPBagX skipUntil(Predicate p) { - - return (LazyPBagX)super.skipUntil(p); + + return (LazyPBagX) super.skipUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) */ @Override public LazyPBagX limitWhile(Predicate p) { - - return (LazyPBagX)super.limitWhile(p); + + return (LazyPBagX) super.limitWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) */ @Override public LazyPBagX limitUntil(Predicate p) { - - return (LazyPBagX)super.limitUntil(p); + + return (LazyPBagX) super.limitUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#intersperse(java.lang.Object) */ @Override public LazyPBagX intersperse(T value) { - - return (LazyPBagX)super.intersperse(value); + + return (LazyPBagX) super.intersperse(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle() */ @Override public LazyPBagX shuffle() { - - return (LazyPBagX)super.shuffle(); + + return (LazyPBagX) super.shuffle(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipLast(int) */ @Override public LazyPBagX skipLast(int num) { - - return (LazyPBagX)super.skipLast(num); + + return (LazyPBagX) super.skipLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitLast(int) */ @Override public LazyPBagX limitLast(int num) { - - return (LazyPBagX)super.limitLast(num); + + return (LazyPBagX) super.limitLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmpty(java.lang.Object) */ @Override public LazyPBagX onEmpty(T value) { - - return (LazyPBagX)super.onEmpty(value); + + return (LazyPBagX) super.onEmpty(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) */ @Override public LazyPBagX onEmptyGet(Supplier supplier) { - - return (LazyPBagX)super.onEmptyGet(supplier); + + return (LazyPBagX) super.onEmptyGet(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) */ @Override public LazyPBagX onEmptyThrow(Supplier supplier) { - - return (LazyPBagX)super.onEmptyThrow(supplier); + + return (LazyPBagX) super.onEmptyThrow(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle(java.util.Random) */ @Override public LazyPBagX shuffle(Random random) { - - return (LazyPBagX)super.shuffle(random); + + return (LazyPBagX) super.shuffle(random); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#ofType(java.lang.Class) */ @Override public LazyPBagX ofType(Class type) { - - return (LazyPBagX)super.ofType(type); + + return (LazyPBagX) super.ofType(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filterNot(java.util.function.Predicate) */ @Override public LazyPBagX filterNot(Predicate fn) { - - return (LazyPBagX)super.filterNot(fn); + + return (LazyPBagX) super.filterNot(fn); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#notNull() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#notNull() */ @Override public LazyPBagX notNull() { - - return (LazyPBagX)super.notNull(); + + return (LazyPBagX) super.notNull(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.util.stream.Stream) */ @Override public LazyPBagX removeAll(Stream stream) { - - return (LazyPBagX)(super.removeAll(stream)); + + return (LazyPBagX) (super.removeAll(stream)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) */ @Override public LazyPBagX removeAll(Seq stream) { - - return (LazyPBagX)super.removeAll(stream); + + return (LazyPBagX) super.removeAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Iterable) */ @Override public LazyPBagX removeAll(Iterable it) { - - return (LazyPBagX)super.removeAll(it); + + return (LazyPBagX) super.removeAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Object[]) */ @Override public LazyPBagX removeAll(T... values) { - - return (LazyPBagX)super.removeAll(values); + + return (LazyPBagX) super.removeAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Iterable) */ @Override public LazyPBagX retainAll(Iterable it) { - - return (LazyPBagX)super.retainAll(it); + + return (LazyPBagX) super.retainAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.util.stream.Stream) */ @Override public LazyPBagX retainAll(Stream stream) { - - return (LazyPBagX)super.retainAll(stream); + + return (LazyPBagX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) */ @Override public LazyPBagX retainAll(Seq stream) { - - return (LazyPBagX)super.retainAll(stream); + + return (LazyPBagX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Object[]) */ @Override public LazyPBagX retainAll(T... values) { - - return (LazyPBagX)super.retainAll(values); + + return (LazyPBagX) super.retainAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cast(java.lang.Class) */ @Override public LazyPBagX cast(Class type) { - - return (LazyPBagX)super.cast(type); + + return (LazyPBagX) super.cast(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#patternMatch(java.util.function.Function, + * java.util.function.Supplier) */ @Override public LazyPBagX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyPBagX)super.patternMatch(case1, otherwise); + + return (LazyPBagX) super.patternMatch(case1, otherwise); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#permutations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#permutations() */ @Override public LazyPBagX> permutations() { - - return (LazyPBagX>)super.permutations(); + + return (LazyPBagX>) super.permutations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations(int) */ @Override public LazyPBagX> combinations(int size) { - - return (LazyPBagX>)super.combinations(size); + + return (LazyPBagX>) super.combinations(size); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations() */ @Override public LazyPBagX> combinations() { - - return (LazyPBagX>)super.combinations(); + + return (LazyPBagX>) super.combinations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) */ @Override public > LazyPBagX grouped(int size, Supplier supplier) { - - return (LazyPBagX)super.grouped(size, supplier); + + return (LazyPBagX) super.grouped(size, supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) */ @Override public LazyPBagX> groupedUntil(Predicate predicate) { - - return (LazyPBagX>)super.groupedUntil(predicate); + + return (LazyPBagX>) super.groupedUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) */ @Override public LazyPBagX> groupedWhile(Predicate predicate) { - - return (LazyPBagX>)super.groupedWhile(predicate); + + return (LazyPBagX>) super.groupedWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPBagX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyPBagX)super.groupedWhile(predicate, factory); + + return (LazyPBagX) super.groupedWhile(predicate, factory); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPBagX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyPBagX)super.groupedUntil(predicate, factory); + + return (LazyPBagX) super.groupedUntil(predicate, factory); } - + /** PStackX methods **/ - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, + * java.lang.Object) */ - public LazyPBagX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyPBagX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyPBagX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyPBagX>)super.groupedStatefullyUntil(predicate); + + return (LazyPBagX>) super.groupedStatefullyUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyPBagX peek(Consumer c) { - - return (LazyPBagX)super.peek(c); + + return (LazyPBagX) super.peek(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazyPBagX zip(Seq other, - BiFunction zipper) { - - return (LazyPBagX)super.zip(other, zipper); + public LazyPBagX zip(Seq other, BiFunction zipper) { + + return (LazyPBagX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazyPBagX zip(Stream other, - BiFunction zipper) { - - return (LazyPBagX)super.zip(other, zipper); + public LazyPBagX zip(Stream other, BiFunction zipper) { + + return (LazyPBagX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyPBagX> zip(Stream other) { - - return (LazyPBagX)super.zip(other); + + return (LazyPBagX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyPBagX zip(BiFunction fn, Publisher publisher) { - - return (LazyPBagX)super.zip(fn, publisher); + + return (LazyPBagX) super.zip(fn, publisher); } - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazyPBagX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); - + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); + } - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit(Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit( + * Collection) */ @Override public LazyPBagX unit(Collection col) { - + return fromIterable(col); } - + @Override public LazyPBagX unit(R value) { return singleton(value); } @Override - public LazyPBagX unitIterator(Iterator it) { + public LazyPBagX unitIterator(Iterator it) { return fromIterable(() -> it); } @Override public LazyPBagX emptyUnit() { - + return LazyPBagX. empty(); } @@ -1285,15 +1583,21 @@ public LazyPBagX toPVector() { return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazyPBagX plusInOrder(T e) { return plus(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.CollectionX#stream() */ @Override @@ -1301,56 +1605,75 @@ public ReactiveSeq stream() { return ReactiveSeq.fromIterable(this); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazyPBagX from(Collection col) { return fromIterable(col); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PQueueX#monoid() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PQueueX#monoid() */ @Override public Reducer> monoid() { - + return Reducers.toPBag(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plus(java.lang.Object) */ @Override public LazyPBagX plus(T e) { - return new LazyPBagX(getBag().plus(e),this.collector); + return new LazyPBagX( + getBag().plus(e), this.collector); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plusAll(java.util.Collection) */ @Override - public LazyPBagX plusAll(Collection list) { - return new LazyPBagX(getBag().plusAll(list),this.collector); + public LazyPBagX plusAll(Collection list) { + return new LazyPBagX( + getBag().plusAll(list), this.collector); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minus(java.lang.Object) */ @Override - public LazyPBagX minus(Object e) { + public LazyPBagX minus(Object e) { PCollection res = getBag().minus(e); - return LazyPBagX.fromIterable(this.collector,res); - + return LazyPBagX.fromIterable(this.collector, res); + } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAll(java.util.Collection) */ public LazyPBagX minusAll(Collection list) { PCollection res = getBag().minusAll(list); - return LazyPBagX.fromIterable(this.collector,res); + return LazyPBagX.fromIterable(this.collector, res); } } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPOrderedSetX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPOrderedSetX.java index 4e977290..4ef461cd 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPOrderedSetX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPOrderedSetX.java @@ -43,6 +43,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; import reactor.core.publisher.Flux; + /** * An extended OrderedSet type {@see java.util.Set} * This makes use of POrderedSet (@see org.pcollections.POrderedSet) from PCollectons. @@ -75,24 +76,23 @@ * * @param the type of elements held in this collection */ -@AllArgsConstructor(access=AccessLevel.PRIVATE) -public class LazyPOrderedSetX extends AbstractFluentCollectionX implements POrderedSetX { - private final LazyFluentCollection> lazy; +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class LazyPOrderedSetX extends AbstractFluentCollectionXimplements POrderedSetX { + private final LazyFluentCollection> lazy; @Getter private final Reducer> collector; - - - /** * Create a LazyPStackX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyPStackX */ - public static LazyPOrderedSetX fromStreamS(Stream stream){ - return new LazyPOrderedSetX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyPOrderedSetX fromStreamS(Stream stream) { + return new LazyPOrderedSetX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyPStackX that contains the Integers between start and end * @@ -148,7 +148,7 @@ public static LazyPOrderedSetX unfold(U seed, Function LazyPOrderedSetX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -161,10 +161,9 @@ public static LazyPOrderedSetX generate(long limit, Supplier s) { */ public static LazyPOrderedSetX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyPStackX */ @@ -172,14 +171,13 @@ public static LazyPOrderedSetX iterate(long limit, final T seed, final Un return Collectors.toCollection(() -> LazyPOrderedSetX.of()); } - - /** * @return An empty LazyPStackX */ public static LazyPOrderedSetX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -200,8 +198,9 @@ public static LazyPOrderedSetX empty() { */ @SafeVarargs public static LazyPOrderedSetX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -255,42 +254,54 @@ public static LazyPOrderedSetX fromIterable(Iterable it) { public static LazyPOrderedSetX fromIterable(Reducer> collector, Iterable it) { if (it instanceof LazyPOrderedSetX) return (LazyPOrderedSetX) it; - + if (it instanceof POrderedSet) return new LazyPOrderedSetX( - (POrderedSet) it, collector); - + (POrderedSet) it, collector); + return new LazyPOrderedSetX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazyPOrderedSetX(POrderedSet list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPOrderedSetX(POrderedSet list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - private LazyPOrderedSetX(boolean efficientOps,POrderedSet list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPOrderedSetX(boolean efficientOps, POrderedSet list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - - private LazyPOrderedSetX(POrderedSet list){ + + private LazyPOrderedSetX(POrderedSet list) { this.collector = Reducers.toPOrderedSet(); - this.lazy = new PersistentLazyCollection>(list,null,Reducers.toPOrderedSet()); + this.lazy = new PersistentLazyCollection>( + list, null, Reducers.toPOrderedSet()); } - private LazyPOrderedSetX(Flux stream,Reducer> collector){ + + private LazyPOrderedSetX(Flux stream, Reducer> collector) { this.collector = collector; - this.lazy = new PersistentLazyCollection<>(null,stream,Reducers.toPOrderedSet()); + this.lazy = new PersistentLazyCollection<>( + null, stream, Reducers.toPOrderedSet()); } - private LazyPOrderedSetX(Flux stream){ + + private LazyPOrderedSetX(Flux stream) { this.collector = Reducers.toPOrderedSet(); - this.lazy = new PersistentLazyCollection<>(null,stream,collector); + this.lazy = new PersistentLazyCollection<>( + null, stream, collector); } - private LazyPOrderedSetX(){ + + private LazyPOrderedSetX() { this.collector = Reducers.toPOrderedSet(); - this.lazy = new PersistentLazyCollection<>((POrderedSet)this.collector.zero(),null,collector); + this.lazy = new PersistentLazyCollection<>( + (POrderedSet) this.collector.zero(), null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -298,7 +309,9 @@ public void forEach(Consumer action) { getSet().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -306,7 +319,9 @@ public Iterator iterator() { return getSet().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -314,7 +329,9 @@ public int size() { return getSet().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -322,7 +339,9 @@ public boolean contains(Object e) { return getSet().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -330,9 +349,9 @@ public boolean equals(Object o) { return getSet().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -340,7 +359,9 @@ public boolean isEmpty() { return getSet().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -348,7 +369,9 @@ public int hashCode() { return getSet().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -356,7 +379,9 @@ public Object[] toArray() { return getSet().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -364,7 +389,9 @@ public boolean removeAll(Collection c) { return getSet().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -372,7 +399,9 @@ public T[] toArray(T[] a) { return getSet().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -380,7 +409,9 @@ public boolean add(T e) { return getSet().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -388,7 +419,9 @@ public boolean remove(Object o) { return getSet().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -396,7 +429,9 @@ public boolean containsAll(Collection c) { return getSet().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -404,7 +439,9 @@ public boolean addAll(Collection c) { return getSet().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -412,7 +449,9 @@ public boolean retainAll(Collection c) { return getSet().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -420,8 +459,9 @@ public void clear() { getSet().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -429,7 +469,9 @@ public String toString() { return getSet().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -437,847 +479,1110 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getSet().removeIf(filter); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getSet().parallelStream(); } - - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getSet().spliterator(); } - + /** * @return POrderedSet */ private POrderedSet getSet() { return lazy.get(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyPOrderedSetX stream(Flux stream){ - return new LazyPOrderedSetX(stream); + public LazyPOrderedSetX stream(Flux stream) { + return new LazyPOrderedSetX( + stream); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flux() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flux() */ @Override public Flux flux() { return lazy.flux(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combine(java.util.function.BiPredicate, + * java.util.function.BinaryOperator) */ @Override public LazyPOrderedSetX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyPOrderedSetX)super.combine(predicate, op); + + return (LazyPOrderedSetX) super.combine(predicate, op); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#reverse() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#reverse() */ @Override public LazyPOrderedSetX reverse() { - - return(LazyPOrderedSetX)super.reverse(); + + return (LazyPOrderedSetX) super.reverse(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filter(java.util.function.Predicate) */ @Override public LazyPOrderedSetX filter(Predicate pred) { - - return (LazyPOrderedSetX)super.filter(pred); + + return (LazyPOrderedSetX) super.filter(pred); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#map(java.util.function.Function) */ @Override public LazyPOrderedSetX map(Function mapper) { - - return (LazyPOrderedSetX)super.map(mapper); + + return (LazyPOrderedSetX) super.map(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flatMap(java.util.function.Function) */ @Override public LazyPOrderedSetX flatMap(Function> mapper) { - return (LazyPOrderedSetX)super.flatMap(mapper); + return (LazyPOrderedSetX) super.flatMap(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limit(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limit(long) */ @Override public LazyPOrderedSetX limit(long num) { - return (LazyPOrderedSetX)super.limit(num); + return (LazyPOrderedSetX) super.limit(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skip(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skip(long) */ @Override public LazyPOrderedSetX skip(long num) { - return (LazyPOrderedSetX)super.skip(num); + return (LazyPOrderedSetX) super.skip(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeRight(int) */ @Override public LazyPOrderedSetX takeRight(int num) { - return (LazyPOrderedSetX)super.takeRight(num); + return (LazyPOrderedSetX) super.takeRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropRight(int) */ @Override public LazyPOrderedSetX dropRight(int num) { - return (LazyPOrderedSetX)super.dropRight(num); + return (LazyPOrderedSetX) super.dropRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) */ @Override public LazyPOrderedSetX takeWhile(Predicate p) { - return (LazyPOrderedSetX)super.takeWhile(p); + return (LazyPOrderedSetX) super.takeWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) */ @Override public LazyPOrderedSetX dropWhile(Predicate p) { - return (LazyPOrderedSetX)super.dropWhile(p); + return (LazyPOrderedSetX) super.dropWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) */ @Override public LazyPOrderedSetX takeUntil(Predicate p) { - return (LazyPOrderedSetX)super.takeUntil(p); + return (LazyPOrderedSetX) super.takeUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) */ @Override public LazyPOrderedSetX dropUntil(Predicate p) { - return(LazyPOrderedSetX)super.dropUntil(p); + return (LazyPOrderedSetX) super.dropUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#trampoline(java.util.function.Function) */ @Override public LazyPOrderedSetX trampoline(Function> mapper) { - return (LazyPOrderedSetX)super.trampoline(mapper); + return (LazyPOrderedSetX) super.trampoline(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#slice(long, long) */ @Override public LazyPOrderedSetX slice(long from, long to) { - return (LazyPOrderedSetX)super.slice(from, to); + return (LazyPOrderedSetX) super.slice(from, to); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int) */ @Override public LazyPOrderedSetX> grouped(int groupSize) { - - return (LazyPOrderedSetX>)super.grouped(groupSize); + + return (LazyPOrderedSetX>) super.grouped(groupSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function, + * java.util.stream.Collector) */ @Override public LazyPOrderedSetX> grouped(Function classifier, Collector downstream) { - - return (LazyPOrderedSetX)super.grouped(classifier, downstream); + + return (LazyPOrderedSetX) super.grouped(classifier, downstream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function) */ @Override public LazyPOrderedSetX>> grouped(Function classifier) { - - return (LazyPOrderedSetX)super.grouped(classifier); + + return (LazyPOrderedSetX) super.grouped(classifier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable) */ @Override public LazyPOrderedSetX> zip(Iterable other) { - - return (LazyPOrderedSetX)super.zip(other); + + return (LazyPOrderedSetX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable, + * java.util.function.BiFunction) */ @Override - public LazyPOrderedSetX zip(Iterable other, BiFunction zipper) { - - return (LazyPOrderedSetX)super.zip(other, zipper); + public LazyPOrderedSetX zip(Iterable other, + BiFunction zipper) { + + return (LazyPOrderedSetX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int) */ @Override public LazyPOrderedSetX> sliding(int windowSize) { - - return (LazyPOrderedSetX>)super.sliding(windowSize); + + return (LazyPOrderedSetX>) super.sliding(windowSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int, int) */ @Override public LazyPOrderedSetX> sliding(int windowSize, int increment) { - - return (LazyPOrderedSetX>)super.sliding(windowSize, increment); + + return (LazyPOrderedSetX>) super.sliding(windowSize, increment); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) */ @Override public LazyPOrderedSetX scanLeft(Monoid monoid) { - - return (LazyPOrderedSetX)super.scanLeft(monoid); + + return (LazyPOrderedSetX) super.scanLeft(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPOrderedSetX scanLeft(U seed, BiFunction function) { - + return (LazyPOrderedSetX) super.scanLeft(seed, function); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) */ @Override public LazyPOrderedSetX scanRight(Monoid monoid) { - - return (LazyPOrderedSetX)super.scanRight(monoid); + + return (LazyPOrderedSetX) super.scanRight(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPOrderedSetX scanRight(U identity, BiFunction combiner) { - - return (LazyPOrderedSetX)super.scanRight(identity, combiner); + + return (LazyPOrderedSetX) super.scanRight(identity, combiner); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.function.Function) */ @Override public > LazyPOrderedSetX sorted(Function function) { - - return (LazyPOrderedSetX)super.sorted(function); + + return (LazyPOrderedSetX) super.sorted(function); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusLazy(java.lang.Object) */ @Override public LazyPOrderedSetX plusLazy(T e) { - - return (LazyPOrderedSetX)super.plusLazy(e); + + return (LazyPOrderedSetX) super.plusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusAllLazy(java.util.Collection) */ @Override public LazyPOrderedSetX plusAllLazy(Collection list) { - - return (LazyPOrderedSetX)super.plusAllLazy(list); + + return (LazyPOrderedSetX) super.plusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusLazy(java.lang.Object) */ @Override public LazyPOrderedSetX minusLazy(Object e) { - - return (LazyPOrderedSetX)super.minusLazy(e); + + return (LazyPOrderedSetX) super.minusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAllLazy(java.util.Collection) */ @Override public LazyPOrderedSetX minusAllLazy(Collection list) { - - return (LazyPOrderedSetX)super.minusAllLazy(list); + + return (LazyPOrderedSetX) super.minusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(int) */ @Override public LazyPStackX cycle(int times) { - return LazyPStackX.fromPublisher(Flux.from(this.stream().cycle(times))); + return LazyPStackX.fromPublisher(Flux.from(this.stream() + .cycle(times))); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) */ @Override public LazyPStackX cycle(Monoid m, int times) { - return LazyPStackX.fromPublisher(Flux.from(this.stream().cycle(m,times))); + return LazyPStackX.fromPublisher(Flux.from(this.stream() + .cycle(m, times))); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) */ @Override public LazyPStackX cycleWhile(Predicate predicate) { - return LazyPStackX.fromPublisher(Flux.from(this.stream().cycleWhile(predicate))); + return LazyPStackX.fromPublisher(Flux.from(this.stream() + .cycleWhile(predicate))); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) */ @Override public LazyPStackX cycleUntil(Predicate predicate) { - return LazyPStackX.fromPublisher(Flux.from(this.stream().cycleUntil(predicate))); + return LazyPStackX.fromPublisher(Flux.from(this.stream() + .cycleUntil(predicate))); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) */ @Override public LazyPOrderedSetX> zip(Seq other) { - - return (LazyPOrderedSetX)super.zip(other); + + return (LazyPOrderedSetX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip3(java.util.stream.Stream, + * java.util.stream.Stream) */ @Override public LazyPOrderedSetX> zip3(Stream second, Stream third) { - - return (LazyPOrderedSetX)super.zip3(second, third); + + return (LazyPOrderedSetX) super.zip3(second, third); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip4(java.util.stream.Stream, + * java.util.stream.Stream, java.util.stream.Stream) */ @Override - public LazyPOrderedSetX> zip4(Stream second, Stream third, - Stream fourth) { - - return (LazyPOrderedSetX)super.zip4(second, third, fourth); + public LazyPOrderedSetX> zip4(Stream second, + Stream third, Stream fourth) { + + return (LazyPOrderedSetX) super.zip4(second, third, fourth); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zipWithIndex() */ @Override public LazyPOrderedSetX> zipWithIndex() { - - return (LazyPOrderedSetX>)super.zipWithIndex(); + + return (LazyPOrderedSetX>) super.zipWithIndex(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#distinct() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#distinct() */ @Override public LazyPOrderedSetX distinct() { - - return (LazyPOrderedSetX)super.distinct(); + + return (LazyPOrderedSetX) super.distinct(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted() */ @Override public LazyPOrderedSetX sorted() { - - return (LazyPOrderedSetX)super.sorted(); + + return (LazyPOrderedSetX) super.sorted(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.Comparator) */ @Override public LazyPOrderedSetX sorted(Comparator c) { - - return (LazyPOrderedSetX)super.sorted(c); + + return (LazyPOrderedSetX) super.sorted(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) */ @Override public LazyPOrderedSetX skipWhile(Predicate p) { - - return (LazyPOrderedSetX)super.skipWhile(p); + + return (LazyPOrderedSetX) super.skipWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) */ @Override public LazyPOrderedSetX skipUntil(Predicate p) { - - return (LazyPOrderedSetX)super.skipUntil(p); + + return (LazyPOrderedSetX) super.skipUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) */ @Override public LazyPOrderedSetX limitWhile(Predicate p) { - - return (LazyPOrderedSetX)super.limitWhile(p); + + return (LazyPOrderedSetX) super.limitWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) */ @Override public LazyPOrderedSetX limitUntil(Predicate p) { - - return (LazyPOrderedSetX)super.limitUntil(p); + + return (LazyPOrderedSetX) super.limitUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#intersperse(java.lang.Object) */ @Override public LazyPOrderedSetX intersperse(T value) { - - return (LazyPOrderedSetX)super.intersperse(value); + + return (LazyPOrderedSetX) super.intersperse(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle() */ @Override public LazyPOrderedSetX shuffle() { - - return (LazyPOrderedSetX)super.shuffle(); + + return (LazyPOrderedSetX) super.shuffle(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipLast(int) */ @Override public LazyPOrderedSetX skipLast(int num) { - - return (LazyPOrderedSetX)super.skipLast(num); + + return (LazyPOrderedSetX) super.skipLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitLast(int) */ @Override public LazyPOrderedSetX limitLast(int num) { - - return (LazyPOrderedSetX)super.limitLast(num); + + return (LazyPOrderedSetX) super.limitLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmpty(java.lang.Object) */ @Override public LazyPOrderedSetX onEmpty(T value) { - - return (LazyPOrderedSetX)super.onEmpty(value); + + return (LazyPOrderedSetX) super.onEmpty(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) */ @Override public LazyPOrderedSetX onEmptyGet(Supplier supplier) { - - return (LazyPOrderedSetX)super.onEmptyGet(supplier); + + return (LazyPOrderedSetX) super.onEmptyGet(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) */ @Override public LazyPOrderedSetX onEmptyThrow(Supplier supplier) { - - return (LazyPOrderedSetX)super.onEmptyThrow(supplier); + + return (LazyPOrderedSetX) super.onEmptyThrow(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle(java.util.Random) */ @Override public LazyPOrderedSetX shuffle(Random random) { - - return (LazyPOrderedSetX)super.shuffle(random); + + return (LazyPOrderedSetX) super.shuffle(random); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#ofType(java.lang.Class) */ @Override public LazyPOrderedSetX ofType(Class type) { - - return (LazyPOrderedSetX)super.ofType(type); + + return (LazyPOrderedSetX) super.ofType(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filterNot(java.util.function.Predicate) */ @Override public LazyPOrderedSetX filterNot(Predicate fn) { - - return (LazyPOrderedSetX)super.filterNot(fn); + + return (LazyPOrderedSetX) super.filterNot(fn); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#notNull() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#notNull() */ @Override public LazyPOrderedSetX notNull() { - - return (LazyPOrderedSetX)super.notNull(); + + return (LazyPOrderedSetX) super.notNull(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.util.stream.Stream) */ @Override public LazyPOrderedSetX removeAll(Stream stream) { - - return (LazyPOrderedSetX)(super.removeAll(stream)); + + return (LazyPOrderedSetX) (super.removeAll(stream)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) */ @Override public LazyPOrderedSetX removeAll(Seq stream) { - - return (LazyPOrderedSetX)super.removeAll(stream); + + return (LazyPOrderedSetX) super.removeAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Iterable) */ @Override public LazyPOrderedSetX removeAll(Iterable it) { - - return (LazyPOrderedSetX)super.removeAll(it); + + return (LazyPOrderedSetX) super.removeAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Object[]) */ @Override public LazyPOrderedSetX removeAll(T... values) { - - return (LazyPOrderedSetX)super.removeAll(values); + + return (LazyPOrderedSetX) super.removeAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Iterable) */ @Override public LazyPOrderedSetX retainAll(Iterable it) { - - return (LazyPOrderedSetX)super.retainAll(it); + + return (LazyPOrderedSetX) super.retainAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.util.stream.Stream) */ @Override public LazyPOrderedSetX retainAll(Stream stream) { - - return (LazyPOrderedSetX)super.retainAll(stream); + + return (LazyPOrderedSetX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) */ @Override public LazyPOrderedSetX retainAll(Seq stream) { - - return (LazyPOrderedSetX)super.retainAll(stream); + + return (LazyPOrderedSetX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Object[]) */ @Override public LazyPOrderedSetX retainAll(T... values) { - - return (LazyPOrderedSetX)super.retainAll(values); + + return (LazyPOrderedSetX) super.retainAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cast(java.lang.Class) */ @Override public LazyPOrderedSetX cast(Class type) { - - return (LazyPOrderedSetX)super.cast(type); + + return (LazyPOrderedSetX) super.cast(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#patternMatch(java.util.function.Function, + * java.util.function.Supplier) */ @Override public LazyPOrderedSetX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyPOrderedSetX)super.patternMatch(case1, otherwise); + + return (LazyPOrderedSetX) super.patternMatch(case1, otherwise); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#permutations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#permutations() */ @Override public LazyPOrderedSetX> permutations() { - - return (LazyPOrderedSetX>)super.permutations(); + + return (LazyPOrderedSetX>) super.permutations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations(int) */ @Override public LazyPOrderedSetX> combinations(int size) { - - return (LazyPOrderedSetX>)super.combinations(size); + + return (LazyPOrderedSetX>) super.combinations(size); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations() */ @Override public LazyPOrderedSetX> combinations() { - - return (LazyPOrderedSetX>)super.combinations(); + + return (LazyPOrderedSetX>) super.combinations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) */ @Override public > LazyPOrderedSetX grouped(int size, Supplier supplier) { - - return (LazyPOrderedSetX)super.grouped(size, supplier); + + return (LazyPOrderedSetX) super.grouped(size, supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) */ @Override public LazyPOrderedSetX> groupedUntil(Predicate predicate) { - - return (LazyPOrderedSetX>)super.groupedUntil(predicate); + + return (LazyPOrderedSetX>) super.groupedUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) */ @Override public LazyPOrderedSetX> groupedWhile(Predicate predicate) { - - return (LazyPOrderedSetX>)super.groupedWhile(predicate); + + return (LazyPOrderedSetX>) super.groupedWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPOrderedSetX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyPOrderedSetX)super.groupedWhile(predicate, factory); + + return (LazyPOrderedSetX) super.groupedWhile(predicate, factory); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPOrderedSetX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyPOrderedSetX)super.groupedUntil(predicate, factory); + + return (LazyPOrderedSetX) super.groupedUntil(predicate, factory); } - + /** PStackX methods **/ - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, + * java.lang.Object) */ - public LazyPOrderedSetX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyPOrderedSetX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyPOrderedSetX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyPOrderedSetX>)super.groupedStatefullyUntil(predicate); + + return (LazyPOrderedSetX>) super.groupedStatefullyUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyPOrderedSetX peek(Consumer c) { - - return (LazyPOrderedSetX)super.peek(c); + + return (LazyPOrderedSetX) super.peek(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override public LazyPOrderedSetX zip(Seq other, BiFunction zipper) { - - return (LazyPOrderedSetX)super.zip(other, zipper); + + return (LazyPOrderedSetX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override public LazyPOrderedSetX zip(Stream other, BiFunction zipper) { - - return (LazyPOrderedSetX)super.zip(other, zipper); + + return (LazyPOrderedSetX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyPOrderedSetX> zip(Stream other) { - - return (LazyPOrderedSetX)super.zip(other); + + return (LazyPOrderedSetX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyPOrderedSetX zip(BiFunction fn, Publisher publisher) { - - return (LazyPOrderedSetX)super.zip(fn, publisher); + + return (LazyPOrderedSetX) super.zip(fn, publisher); } - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazyPOrderedSetX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); - + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); + } - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit(Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit( + * Collection) */ @Override public LazyPOrderedSetX unit(Collection col) { - + return fromIterable(col); } - + @Override public LazyPOrderedSetX unit(R value) { return singleton(value); } @Override - public LazyPOrderedSetX unitIterator(Iterator it) { + public LazyPOrderedSetX unitIterator(Iterator it) { return fromIterable(() -> it); } @Override public LazyPOrderedSetX emptyUnit() { - + return LazyPOrderedSetX. empty(); } @@ -1288,15 +1593,21 @@ public LazyPOrderedSetX toPVector() { return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazyPOrderedSetX plusInOrder(T e) { return plus(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.CollectionX#stream() */ @Override @@ -1304,43 +1615,56 @@ public ReactiveSeq stream() { return ReactiveSeq.fromIterable(this); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazyPOrderedSetX from(Collection col) { return fromIterable(col); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PQueueX#monoid() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PQueueX#monoid() */ @Override public Reducer> monoid() { - + return Reducers.toPOrderedSet(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plus(java.lang.Object) */ @Override public LazyPOrderedSetX plus(T e) { - return new LazyPOrderedSetX(getSet().plus(e),this.collector); + return new LazyPOrderedSetX( + getSet().plus(e), this.collector); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plusAll(java.util.Collection) */ @Override - public LazyPOrderedSetX plusAll(Collection list) { - return new LazyPOrderedSetX(getSet().plusAll(list),this.collector); + public LazyPOrderedSetX plusAll(Collection list) { + return new LazyPOrderedSetX( + getSet().plusAll(list), this.collector); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.POrderedSet#get(int) */ @Override @@ -1348,35 +1672,38 @@ public T get(int index) { return getSet().get(index); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.POrderedSet#indexOf(java.lang.Object) */ @Override public int indexOf(Object o) { return getSet().indexOf(o); } - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minus(java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minus(java.lang.Object) */ @Override - public LazyPOrderedSetX minus(Object e) { + public LazyPOrderedSetX minus(Object e) { PCollection res = getSet().minus(e); - return LazyPOrderedSetX.fromIterable(this.collector,res); - + return LazyPOrderedSetX.fromIterable(this.collector, res); + } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAll(java.util.Collection) */ public LazyPOrderedSetX minusAll(Collection list) { PCollection res = getSet().minusAll(list); - return LazyPOrderedSetX.fromIterable(this.collector,res); + return LazyPOrderedSetX.fromIterable(this.collector, res); } } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPQueueX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPQueueX.java index 46ad6844..0e4eacfc 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPQueueX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPQueueX.java @@ -45,6 +45,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; import reactor.core.publisher.Flux; + /** * An extended Queue type {@see java.util.Queue} * This makes use of PQueue (@see org.pcollections.PQueue) from PCollectons. @@ -73,24 +74,23 @@ * * @param the type of elements held in this collection */ -@AllArgsConstructor(access=AccessLevel.PRIVATE) -public class LazyPQueueX extends AbstractFluentCollectionX implements PQueueX { - private final LazyFluentCollection> lazy; +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class LazyPQueueX extends AbstractFluentCollectionXimplements PQueueX { + private final LazyFluentCollection> lazy; @Getter private final Reducer> collector; - - - /** * Create a LazyPStackX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyPStackX */ - public static LazyPQueueX fromStreamS(Stream stream){ - return new LazyPQueueX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyPQueueX fromStreamS(Stream stream) { + return new LazyPQueueX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyPStackX that contains the Integers between start and end * @@ -146,7 +146,7 @@ public static LazyPQueueX unfold(U seed, Function LazyPQueueX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -159,10 +159,9 @@ public static LazyPQueueX generate(long limit, Supplier s) { */ public static LazyPQueueX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyPStackX */ @@ -170,14 +169,13 @@ public static LazyPQueueX iterate(long limit, final T seed, final UnaryOp return Collectors.toCollection(() -> LazyPQueueX.of()); } - - /** * @return An empty LazyPStackX */ public static LazyPQueueX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -198,8 +196,9 @@ public static LazyPQueueX empty() { */ @SafeVarargs public static LazyPQueueX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -253,42 +252,54 @@ public static LazyPQueueX fromIterable(Iterable it) { public static LazyPQueueX fromIterable(Reducer> collector, Iterable it) { if (it instanceof LazyPQueueX) return (LazyPQueueX) it; - + if (it instanceof PQueue) return new LazyPQueueX( - (PQueue) it, collector); - + (PQueue) it, collector); + return new LazyPQueueX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazyPQueueX(PQueue list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPQueueX(PQueue list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - private LazyPQueueX(boolean efficientOps,PQueue list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPQueueX(boolean efficientOps, PQueue list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - - private LazyPQueueX(PQueue list){ + + private LazyPQueueX(PQueue list) { this.collector = Reducers.toPQueue(); - this.lazy = new PersistentLazyCollection>(list,null,Reducers.toPQueue()); + this.lazy = new PersistentLazyCollection>( + list, null, Reducers.toPQueue()); } - private LazyPQueueX(Flux stream,Reducer> collector){ + + private LazyPQueueX(Flux stream, Reducer> collector) { this.collector = collector; - this.lazy = new PersistentLazyCollection<>(null,stream,Reducers.toPQueue()); + this.lazy = new PersistentLazyCollection<>( + null, stream, Reducers.toPQueue()); } - private LazyPQueueX(Flux stream){ + + private LazyPQueueX(Flux stream) { this.collector = Reducers.toPQueue(); - this.lazy = new PersistentLazyCollection<>(null,stream,collector); + this.lazy = new PersistentLazyCollection<>( + null, stream, collector); } - private LazyPQueueX(){ + + private LazyPQueueX() { this.collector = Reducers.toPQueue(); - this.lazy = new PersistentLazyCollection<>((PQueue)this.collector.zero(),null,collector); + this.lazy = new PersistentLazyCollection<>( + (PQueue) this.collector.zero(), null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -296,7 +307,9 @@ public void forEach(Consumer action) { getQueue().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -304,7 +317,9 @@ public Iterator iterator() { return getQueue().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -312,7 +327,9 @@ public int size() { return getQueue().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -320,7 +337,9 @@ public boolean contains(Object e) { return getQueue().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -328,9 +347,9 @@ public boolean equals(Object o) { return getQueue().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -338,7 +357,9 @@ public boolean isEmpty() { return getQueue().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -346,7 +367,9 @@ public int hashCode() { return getQueue().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -354,7 +377,9 @@ public Object[] toArray() { return getQueue().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -362,7 +387,9 @@ public boolean removeAll(Collection c) { return getQueue().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -370,7 +397,9 @@ public T[] toArray(T[] a) { return getQueue().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -378,7 +407,9 @@ public boolean add(T e) { return getQueue().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -386,7 +417,9 @@ public boolean remove(Object o) { return getQueue().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -394,7 +427,9 @@ public boolean containsAll(Collection c) { return getQueue().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -402,7 +437,9 @@ public boolean addAll(Collection c) { return getQueue().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -410,7 +447,9 @@ public boolean retainAll(Collection c) { return getQueue().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -418,8 +457,9 @@ public void clear() { getQueue().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -427,7 +467,9 @@ public String toString() { return getQueue().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -435,851 +477,1108 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getQueue().removeIf(filter); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getQueue().parallelStream(); } - - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getQueue().spliterator(); } - + /** * @return PQueue */ private PQueue getQueue() { return lazy.get(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyPQueueX stream(Flux stream){ - return new LazyPQueueX(stream); + public LazyPQueueX stream(Flux stream) { + return new LazyPQueueX( + stream); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flux() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flux() */ @Override public Flux flux() { return lazy.flux(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combine(java.util.function.BiPredicate, + * java.util.function.BinaryOperator) */ @Override public LazyPQueueX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyPQueueX)super.combine(predicate, op); + + return (LazyPQueueX) super.combine(predicate, op); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#reverse() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#reverse() */ @Override public LazyPQueueX reverse() { - - return(LazyPQueueX)super.reverse(); + + return (LazyPQueueX) super.reverse(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filter(java.util.function.Predicate) */ @Override public LazyPQueueX filter(Predicate pred) { - - return (LazyPQueueX)super.filter(pred); + + return (LazyPQueueX) super.filter(pred); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#map(java.util.function.Function) */ @Override public LazyPQueueX map(Function mapper) { - - return (LazyPQueueX)super.map(mapper); + + return (LazyPQueueX) super.map(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flatMap(java.util.function.Function) */ @Override public LazyPQueueX flatMap(Function> mapper) { - return (LazyPQueueX)super.flatMap(mapper); + return (LazyPQueueX) super.flatMap(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limit(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limit(long) */ @Override public LazyPQueueX limit(long num) { - return (LazyPQueueX)super.limit(num); + return (LazyPQueueX) super.limit(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skip(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skip(long) */ @Override public LazyPQueueX skip(long num) { - return (LazyPQueueX)super.skip(num); + return (LazyPQueueX) super.skip(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeRight(int) */ @Override public LazyPQueueX takeRight(int num) { - return (LazyPQueueX)super.takeRight(num); + return (LazyPQueueX) super.takeRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropRight(int) */ @Override public LazyPQueueX dropRight(int num) { - return (LazyPQueueX)super.dropRight(num); + return (LazyPQueueX) super.dropRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) */ @Override public LazyPQueueX takeWhile(Predicate p) { - return (LazyPQueueX)super.takeWhile(p); + return (LazyPQueueX) super.takeWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) */ @Override public LazyPQueueX dropWhile(Predicate p) { - return (LazyPQueueX)super.dropWhile(p); + return (LazyPQueueX) super.dropWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) */ @Override public LazyPQueueX takeUntil(Predicate p) { - return (LazyPQueueX)super.takeUntil(p); + return (LazyPQueueX) super.takeUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) */ @Override public LazyPQueueX dropUntil(Predicate p) { - return(LazyPQueueX)super.dropUntil(p); + return (LazyPQueueX) super.dropUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#trampoline(java.util.function.Function) */ @Override public LazyPQueueX trampoline(Function> mapper) { - return (LazyPQueueX)super.trampoline(mapper); + return (LazyPQueueX) super.trampoline(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#slice(long, long) */ @Override public LazyPQueueX slice(long from, long to) { - return (LazyPQueueX)super.slice(from, to); + return (LazyPQueueX) super.slice(from, to); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int) */ @Override public LazyPQueueX> grouped(int groupSize) { - - return (LazyPQueueX>)super.grouped(groupSize); + + return (LazyPQueueX>) super.grouped(groupSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function, + * java.util.stream.Collector) */ @Override public LazyPQueueX> grouped(Function classifier, Collector downstream) { - - return (LazyPQueueX)super.grouped(classifier, downstream); + + return (LazyPQueueX) super.grouped(classifier, downstream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function) */ @Override public LazyPQueueX>> grouped(Function classifier) { - - return (LazyPQueueX)super.grouped(classifier); + + return (LazyPQueueX) super.grouped(classifier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable) */ @Override public LazyPQueueX> zip(Iterable other) { - - return (LazyPQueueX)super.zip(other); + + return (LazyPQueueX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable, + * java.util.function.BiFunction) */ @Override - public LazyPQueueX zip(Iterable other, BiFunction zipper) { - - return (LazyPQueueX)super.zip(other, zipper); + public LazyPQueueX zip(Iterable other, + BiFunction zipper) { + + return (LazyPQueueX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int) */ @Override public LazyPQueueX> sliding(int windowSize) { - - return (LazyPQueueX>)super.sliding(windowSize); + + return (LazyPQueueX>) super.sliding(windowSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int, int) */ @Override public LazyPQueueX> sliding(int windowSize, int increment) { - - return (LazyPQueueX>)super.sliding(windowSize, increment); + + return (LazyPQueueX>) super.sliding(windowSize, increment); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) */ @Override public LazyPQueueX scanLeft(Monoid monoid) { - - return (LazyPQueueX)super.scanLeft(monoid); + + return (LazyPQueueX) super.scanLeft(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPQueueX scanLeft(U seed, BiFunction function) { - + return (LazyPQueueX) super.scanLeft(seed, function); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) */ @Override public LazyPQueueX scanRight(Monoid monoid) { - - return (LazyPQueueX)super.scanRight(monoid); + + return (LazyPQueueX) super.scanRight(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPQueueX scanRight(U identity, BiFunction combiner) { - - return (LazyPQueueX)super.scanRight(identity, combiner); + + return (LazyPQueueX) super.scanRight(identity, combiner); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.function.Function) */ @Override public > LazyPQueueX sorted(Function function) { - - return (LazyPQueueX)super.sorted(function); + + return (LazyPQueueX) super.sorted(function); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusLazy(java.lang.Object) */ @Override public LazyPQueueX plusLazy(T e) { - - return (LazyPQueueX)super.plusLazy(e); + + return (LazyPQueueX) super.plusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusAllLazy(java.util.Collection) */ @Override public LazyPQueueX plusAllLazy(Collection list) { - - return (LazyPQueueX)super.plusAllLazy(list); + + return (LazyPQueueX) super.plusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusLazy(java.lang.Object) */ @Override public LazyPQueueX minusLazy(Object e) { - - return (LazyPQueueX)super.minusLazy(e); + + return (LazyPQueueX) super.minusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAllLazy(java.util.Collection) */ @Override public LazyPQueueX minusAllLazy(Collection list) { - - return (LazyPQueueX)super.minusAllLazy(list); + + return (LazyPQueueX) super.minusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(int) */ @Override public LazyPQueueX cycle(int times) { - - return (LazyPQueueX)super.cycle(times); + + return (LazyPQueueX) super.cycle(times); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) */ @Override public LazyPQueueX cycle(Monoid m, int times) { - - return (LazyPQueueX)super.cycle(m, times); + + return (LazyPQueueX) super.cycle(m, times); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) */ @Override public LazyPQueueX cycleWhile(Predicate predicate) { - - return (LazyPQueueX)super.cycleWhile(predicate); + + return (LazyPQueueX) super.cycleWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) */ @Override public LazyPQueueX cycleUntil(Predicate predicate) { - - return (LazyPQueueX)super.cycleUntil(predicate); + + return (LazyPQueueX) super.cycleUntil(predicate); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) */ @Override public LazyPQueueX> zip(Seq other) { - - return (LazyPQueueX)super.zip(other); + + return (LazyPQueueX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip3(java.util.stream.Stream, + * java.util.stream.Stream) */ @Override public LazyPQueueX> zip3(Stream second, Stream third) { - - return (LazyPQueueX)super.zip3(second, third); + + return (LazyPQueueX) super.zip3(second, third); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip4(java.util.stream.Stream, + * java.util.stream.Stream, java.util.stream.Stream) */ @Override public LazyPQueueX> zip4(Stream second, Stream third, Stream fourth) { - - return (LazyPQueueX)super.zip4(second, third, fourth); + + return (LazyPQueueX) super.zip4(second, third, fourth); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zipWithIndex() */ @Override public LazyPQueueX> zipWithIndex() { - - return (LazyPQueueX>)super.zipWithIndex(); + + return (LazyPQueueX>) super.zipWithIndex(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#distinct() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#distinct() */ @Override public LazyPQueueX distinct() { - - return (LazyPQueueX)super.distinct(); + + return (LazyPQueueX) super.distinct(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted() */ @Override public LazyPQueueX sorted() { - - return (LazyPQueueX)super.sorted(); + + return (LazyPQueueX) super.sorted(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.Comparator) */ @Override public LazyPQueueX sorted(Comparator c) { - - return (LazyPQueueX)super.sorted(c); + + return (LazyPQueueX) super.sorted(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) */ @Override public LazyPQueueX skipWhile(Predicate p) { - - return (LazyPQueueX)super.skipWhile(p); + + return (LazyPQueueX) super.skipWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) */ @Override public LazyPQueueX skipUntil(Predicate p) { - - return (LazyPQueueX)super.skipUntil(p); + + return (LazyPQueueX) super.skipUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) */ @Override public LazyPQueueX limitWhile(Predicate p) { - - return (LazyPQueueX)super.limitWhile(p); + + return (LazyPQueueX) super.limitWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) */ @Override public LazyPQueueX limitUntil(Predicate p) { - - return (LazyPQueueX)super.limitUntil(p); + + return (LazyPQueueX) super.limitUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#intersperse(java.lang.Object) */ @Override public LazyPQueueX intersperse(T value) { - - return (LazyPQueueX)super.intersperse(value); + + return (LazyPQueueX) super.intersperse(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle() */ @Override public LazyPQueueX shuffle() { - - return (LazyPQueueX)super.shuffle(); + + return (LazyPQueueX) super.shuffle(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipLast(int) */ @Override public LazyPQueueX skipLast(int num) { - - return (LazyPQueueX)super.skipLast(num); + + return (LazyPQueueX) super.skipLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitLast(int) */ @Override public LazyPQueueX limitLast(int num) { - - return (LazyPQueueX)super.limitLast(num); + + return (LazyPQueueX) super.limitLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmpty(java.lang.Object) */ @Override public LazyPQueueX onEmpty(T value) { - - return (LazyPQueueX)super.onEmpty(value); + + return (LazyPQueueX) super.onEmpty(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) */ @Override public LazyPQueueX onEmptyGet(Supplier supplier) { - - return (LazyPQueueX)super.onEmptyGet(supplier); + + return (LazyPQueueX) super.onEmptyGet(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) */ @Override public LazyPQueueX onEmptyThrow(Supplier supplier) { - - return (LazyPQueueX)super.onEmptyThrow(supplier); + + return (LazyPQueueX) super.onEmptyThrow(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle(java.util.Random) */ @Override public LazyPQueueX shuffle(Random random) { - - return (LazyPQueueX)super.shuffle(random); + + return (LazyPQueueX) super.shuffle(random); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#ofType(java.lang.Class) */ @Override public LazyPQueueX ofType(Class type) { - - return (LazyPQueueX)super.ofType(type); + + return (LazyPQueueX) super.ofType(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filterNot(java.util.function.Predicate) */ @Override public LazyPQueueX filterNot(Predicate fn) { - - return (LazyPQueueX)super.filterNot(fn); + + return (LazyPQueueX) super.filterNot(fn); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#notNull() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#notNull() */ @Override public LazyPQueueX notNull() { - - return (LazyPQueueX)super.notNull(); + + return (LazyPQueueX) super.notNull(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.util.stream.Stream) */ @Override public LazyPQueueX removeAll(Stream stream) { - - return (LazyPQueueX)(super.removeAll(stream)); + + return (LazyPQueueX) (super.removeAll(stream)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) */ @Override public LazyPQueueX removeAll(Seq stream) { - - return (LazyPQueueX)super.removeAll(stream); + + return (LazyPQueueX) super.removeAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Iterable) */ @Override public LazyPQueueX removeAll(Iterable it) { - - return (LazyPQueueX)super.removeAll(it); + + return (LazyPQueueX) super.removeAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Object[]) */ @Override public LazyPQueueX removeAll(T... values) { - - return (LazyPQueueX)super.removeAll(values); + + return (LazyPQueueX) super.removeAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Iterable) */ @Override public LazyPQueueX retainAll(Iterable it) { - - return (LazyPQueueX)super.retainAll(it); + + return (LazyPQueueX) super.retainAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.util.stream.Stream) */ @Override public LazyPQueueX retainAll(Stream stream) { - - return (LazyPQueueX)super.retainAll(stream); + + return (LazyPQueueX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) */ @Override public LazyPQueueX retainAll(Seq stream) { - - return (LazyPQueueX)super.retainAll(stream); + + return (LazyPQueueX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Object[]) */ @Override public LazyPQueueX retainAll(T... values) { - - return (LazyPQueueX)super.retainAll(values); + + return (LazyPQueueX) super.retainAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cast(java.lang.Class) */ @Override public LazyPQueueX cast(Class type) { - - return (LazyPQueueX)super.cast(type); + + return (LazyPQueueX) super.cast(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#patternMatch(java.util.function.Function, + * java.util.function.Supplier) */ @Override public LazyPQueueX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyPQueueX)super.patternMatch(case1, otherwise); + + return (LazyPQueueX) super.patternMatch(case1, otherwise); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#permutations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#permutations() */ @Override public LazyPQueueX> permutations() { - - return (LazyPQueueX>)super.permutations(); + + return (LazyPQueueX>) super.permutations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations(int) */ @Override public LazyPQueueX> combinations(int size) { - - return (LazyPQueueX>)super.combinations(size); + + return (LazyPQueueX>) super.combinations(size); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations() */ @Override public LazyPQueueX> combinations() { - - return (LazyPQueueX>)super.combinations(); + + return (LazyPQueueX>) super.combinations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) */ @Override public > LazyPQueueX grouped(int size, Supplier supplier) { - - return (LazyPQueueX)super.grouped(size, supplier); + + return (LazyPQueueX) super.grouped(size, supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) */ @Override public LazyPQueueX> groupedUntil(Predicate predicate) { - - return (LazyPQueueX>)super.groupedUntil(predicate); + + return (LazyPQueueX>) super.groupedUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) */ @Override public LazyPQueueX> groupedWhile(Predicate predicate) { - - return (LazyPQueueX>)super.groupedWhile(predicate); + + return (LazyPQueueX>) super.groupedWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPQueueX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyPQueueX)super.groupedWhile(predicate, factory); + + return (LazyPQueueX) super.groupedWhile(predicate, factory); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPQueueX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyPQueueX)super.groupedUntil(predicate, factory); + + return (LazyPQueueX) super.groupedUntil(predicate, factory); } - + /** PStackX methods **/ - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, + * java.lang.Object) */ - public LazyPQueueX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyPQueueX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyPQueueX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyPQueueX>)super.groupedStatefullyUntil(predicate); + + return (LazyPQueueX>) super.groupedStatefullyUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyPQueueX peek(Consumer c) { - - return (LazyPQueueX)super.peek(c); + + return (LazyPQueueX) super.peek(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazyPQueueX zip(Seq other, - BiFunction zipper) { - - return (LazyPQueueX)super.zip(other, zipper); + public LazyPQueueX zip(Seq other, BiFunction zipper) { + + return (LazyPQueueX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazyPQueueX zip(Stream other, - BiFunction zipper) { - - return (LazyPQueueX)super.zip(other, zipper); + public LazyPQueueX zip(Stream other, BiFunction zipper) { + + return (LazyPQueueX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyPQueueX> zip(Stream other) { - - return (LazyPQueueX)super.zip(other); + + return (LazyPQueueX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyPQueueX zip(BiFunction fn, Publisher publisher) { - - return (LazyPQueueX)super.zip(fn, publisher); + + return (LazyPQueueX) super.zip(fn, publisher); } - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazyPQueueX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); - + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); + } - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit(Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit( + * Collection) */ @Override public LazyPQueueX unit(Collection col) { - + return fromIterable(col); } - + @Override public LazyPQueueX unit(R value) { return singleton(value); } @Override - public LazyPQueueX unitIterator(Iterator it) { + public LazyPQueueX unitIterator(Iterator it) { return fromIterable(() -> it); } @Override public LazyPQueueX emptyUnit() { - + return LazyPQueueX. empty(); } @@ -1290,15 +1589,21 @@ public LazyPQueueX toPVector() { return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazyPQueueX plusInOrder(T e) { return plus(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.CollectionX#stream() */ @Override @@ -1306,84 +1611,101 @@ public ReactiveSeq stream() { return ReactiveSeq.fromIterable(this); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazyPQueueX from(Collection col) { return fromIterable(col); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PQueueX#monoid() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PQueueX#monoid() */ @Override public Reducer> monoid() { - + return Reducers.toPQueue(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plus(java.lang.Object) */ @Override public LazyPQueueX plus(T e) { - return new LazyPQueueX(getQueue().plus(e),this.collector); + return new LazyPQueueX( + getQueue().plus(e), this.collector); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plusAll(java.util.Collection) */ @Override - public LazyPQueueX plusAll(Collection list) { - return new LazyPQueueX(getQueue().plusAll(list),this.collector); + public LazyPQueueX plusAll(Collection list) { + return new LazyPQueueX( + getQueue().plusAll(list), this.collector); } - - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.PQueue#minus() */ public LazyPQueueX minus() { - return LazyPQueueX.fromIterable(this.collector,getQueue().minus()); + return LazyPQueueX.fromIterable(this.collector, getQueue().minus()); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.PQueue#offer(java.lang.Object) */ public boolean offer(T o) { return getQueue().offer(o); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.PQueue#poll() */ public T poll() { return getQueue().poll(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.PQueue#remove() */ public T remove() { return getQueue().remove(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Queue#element() */ public T element() { return getQueue().element(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Queue#peek() */ @Override @@ -1391,22 +1713,28 @@ public T peek() { return getQueue().peek(); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minus(java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minus(java.lang.Object) */ @Override - public LazyPQueueX minus(Object e) { + public LazyPQueueX minus(Object e) { PCollection res = getQueue().minus(e); - return LazyPQueueX.fromIterable(this.collector,res); - + return LazyPQueueX.fromIterable(this.collector, res); + } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAll(java.util.Collection) */ public LazyPQueueX minusAll(Collection list) { PCollection res = getQueue().minusAll(list); - return LazyPQueueX.fromIterable(this.collector,res); + return LazyPQueueX.fromIterable(this.collector, res); } } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPSetX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPSetX.java index bfb8ffc9..56863f75 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPSetX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPSetX.java @@ -44,6 +44,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; import reactor.core.publisher.Flux; + /** * An extended Set type {@see java.util.Set} * This makes use of PSet (@see org.pcollections.PSet) from PCollectons. @@ -76,24 +77,23 @@ * * @param the type of elements held in this collection */ -@AllArgsConstructor(access=AccessLevel.PRIVATE) -public class LazyPSetX extends AbstractFluentCollectionX implements PSetX { - private final LazyFluentCollection> lazy; +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class LazyPSetX extends AbstractFluentCollectionXimplements PSetX { + private final LazyFluentCollection> lazy; @Getter private final Reducer> collector; - - - /** * Create a LazyPStackX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyPStackX */ - public static LazyPSetX fromStreamS(Stream stream){ - return new LazyPSetX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyPSetX fromStreamS(Stream stream) { + return new LazyPSetX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyPStackX that contains the Integers between start and end * @@ -149,7 +149,7 @@ public static LazyPSetX unfold(U seed, Function LazyPSetX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -162,10 +162,9 @@ public static LazyPSetX generate(long limit, Supplier s) { */ public static LazyPSetX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyPStackX */ @@ -173,14 +172,13 @@ public static LazyPSetX iterate(long limit, final T seed, final UnaryOper return Collectors.toCollection(() -> LazyPSetX.of()); } - - /** * @return An empty LazyPStackX */ public static LazyPSetX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -201,8 +199,9 @@ public static LazyPSetX empty() { */ @SafeVarargs public static LazyPSetX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -256,42 +255,54 @@ public static LazyPSetX fromIterable(Iterable it) { public static LazyPSetX fromIterable(Reducer> collector, Iterable it) { if (it instanceof LazyPSetX) return (LazyPSetX) it; - + if (it instanceof PSet) return new LazyPSetX( (PSet) it, collector); - + return new LazyPSetX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazyPSetX(PSet list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPSetX(PSet list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - private LazyPSetX(boolean efficientOps,PSet list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPSetX(boolean efficientOps, PSet list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - - private LazyPSetX(PSet list){ + + private LazyPSetX(PSet list) { this.collector = Reducers.toPSet(); - this.lazy = new PersistentLazyCollection>(list,null,Reducers.toPSet()); + this.lazy = new PersistentLazyCollection>( + list, null, Reducers.toPSet()); } - private LazyPSetX(Flux stream,Reducer> collector){ + + private LazyPSetX(Flux stream, Reducer> collector) { this.collector = collector; - this.lazy = new PersistentLazyCollection<>(null,stream,Reducers.toPSet()); + this.lazy = new PersistentLazyCollection<>( + null, stream, Reducers.toPSet()); } - private LazyPSetX(Flux stream){ + + private LazyPSetX(Flux stream) { this.collector = Reducers.toPSet(); - this.lazy = new PersistentLazyCollection<>(null,stream,collector); + this.lazy = new PersistentLazyCollection<>( + null, stream, collector); } - private LazyPSetX(){ + + private LazyPSetX() { this.collector = Reducers.toPSet(); - this.lazy = new PersistentLazyCollection<>((PSet)this.collector.zero(),null,collector); + this.lazy = new PersistentLazyCollection<>( + (PSet) this.collector.zero(), null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -299,7 +310,9 @@ public void forEach(Consumer action) { getSet().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -307,7 +320,9 @@ public Iterator iterator() { return getSet().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -315,7 +330,9 @@ public int size() { return getSet().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -323,7 +340,9 @@ public boolean contains(Object e) { return getSet().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -331,9 +350,9 @@ public boolean equals(Object o) { return getSet().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -341,7 +360,9 @@ public boolean isEmpty() { return getSet().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -349,7 +370,9 @@ public int hashCode() { return getSet().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -357,7 +380,9 @@ public Object[] toArray() { return getSet().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -365,7 +390,9 @@ public boolean removeAll(Collection c) { return getSet().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -373,7 +400,9 @@ public T[] toArray(T[] a) { return getSet().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -381,7 +410,9 @@ public boolean add(T e) { return getSet().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -389,7 +420,9 @@ public boolean remove(Object o) { return getSet().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -397,7 +430,9 @@ public boolean containsAll(Collection c) { return getSet().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -405,7 +440,9 @@ public boolean addAll(Collection c) { return getSet().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -413,7 +450,9 @@ public boolean retainAll(Collection c) { return getSet().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -421,8 +460,9 @@ public void clear() { getSet().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -430,7 +470,9 @@ public String toString() { return getSet().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -438,847 +480,1107 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getSet().removeIf(filter); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getSet().parallelStream(); } - - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getSet().spliterator(); } - + /** * @return PQueue */ private PSet getSet() { return lazy.get(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyPSetX stream(Flux stream){ - return new LazyPSetX(stream); + public LazyPSetX stream(Flux stream) { + return new LazyPSetX( + stream); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flux() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flux() */ @Override public Flux flux() { return lazy.flux(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combine(java.util.function.BiPredicate, + * java.util.function.BinaryOperator) */ @Override public LazyPSetX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyPSetX)super.combine(predicate, op); + + return (LazyPSetX) super.combine(predicate, op); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#reverse() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#reverse() */ @Override public LazyPSetX reverse() { - - return(LazyPSetX)super.reverse(); + + return (LazyPSetX) super.reverse(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filter(java.util.function.Predicate) */ @Override public LazyPSetX filter(Predicate pred) { - - return (LazyPSetX)super.filter(pred); + + return (LazyPSetX) super.filter(pred); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#map(java.util.function.Function) */ @Override public LazyPSetX map(Function mapper) { - - return (LazyPSetX)super.map(mapper); + + return (LazyPSetX) super.map(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flatMap(java.util.function.Function) */ @Override public LazyPSetX flatMap(Function> mapper) { - return (LazyPSetX)super.flatMap(mapper); + return (LazyPSetX) super.flatMap(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limit(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limit(long) */ @Override public LazyPSetX limit(long num) { - return (LazyPSetX)super.limit(num); + return (LazyPSetX) super.limit(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skip(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skip(long) */ @Override public LazyPSetX skip(long num) { - return (LazyPSetX)super.skip(num); + return (LazyPSetX) super.skip(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeRight(int) */ @Override public LazyPSetX takeRight(int num) { - return (LazyPSetX)super.takeRight(num); + return (LazyPSetX) super.takeRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropRight(int) */ @Override public LazyPSetX dropRight(int num) { - return (LazyPSetX)super.dropRight(num); + return (LazyPSetX) super.dropRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) */ @Override public LazyPSetX takeWhile(Predicate p) { - return (LazyPSetX)super.takeWhile(p); + return (LazyPSetX) super.takeWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) */ @Override public LazyPSetX dropWhile(Predicate p) { - return (LazyPSetX)super.dropWhile(p); + return (LazyPSetX) super.dropWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) */ @Override public LazyPSetX takeUntil(Predicate p) { - return (LazyPSetX)super.takeUntil(p); + return (LazyPSetX) super.takeUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) */ @Override public LazyPSetX dropUntil(Predicate p) { - return(LazyPSetX)super.dropUntil(p); + return (LazyPSetX) super.dropUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#trampoline(java.util.function.Function) */ @Override public LazyPSetX trampoline(Function> mapper) { - return (LazyPSetX)super.trampoline(mapper); + return (LazyPSetX) super.trampoline(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#slice(long, long) */ @Override public LazyPSetX slice(long from, long to) { - return (LazyPSetX)super.slice(from, to); + return (LazyPSetX) super.slice(from, to); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int) */ @Override public LazyPSetX> grouped(int groupSize) { - - return (LazyPSetX>)super.grouped(groupSize); + + return (LazyPSetX>) super.grouped(groupSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function, + * java.util.stream.Collector) */ @Override public LazyPSetX> grouped(Function classifier, Collector downstream) { - - return (LazyPSetX)super.grouped(classifier, downstream); + + return (LazyPSetX) super.grouped(classifier, downstream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function) */ @Override public LazyPSetX>> grouped(Function classifier) { - - return (LazyPSetX)super.grouped(classifier); + + return (LazyPSetX) super.grouped(classifier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable) */ @Override public LazyPSetX> zip(Iterable other) { - - return (LazyPSetX)super.zip(other); + + return (LazyPSetX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable, + * java.util.function.BiFunction) */ @Override public LazyPSetX zip(Iterable other, BiFunction zipper) { - - return (LazyPSetX)super.zip(other, zipper); + + return (LazyPSetX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int) */ @Override public LazyPSetX> sliding(int windowSize) { - - return (LazyPSetX>)super.sliding(windowSize); + + return (LazyPSetX>) super.sliding(windowSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int, int) */ @Override public LazyPSetX> sliding(int windowSize, int increment) { - - return (LazyPSetX>)super.sliding(windowSize, increment); + + return (LazyPSetX>) super.sliding(windowSize, increment); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) */ @Override public LazyPSetX scanLeft(Monoid monoid) { - - return (LazyPSetX)super.scanLeft(monoid); + + return (LazyPSetX) super.scanLeft(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPSetX scanLeft(U seed, BiFunction function) { - + return (LazyPSetX) super.scanLeft(seed, function); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) */ @Override public LazyPSetX scanRight(Monoid monoid) { - - return (LazyPSetX)super.scanRight(monoid); + + return (LazyPSetX) super.scanRight(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPSetX scanRight(U identity, BiFunction combiner) { - - return (LazyPSetX)super.scanRight(identity, combiner); + + return (LazyPSetX) super.scanRight(identity, combiner); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.function.Function) */ @Override public > LazyPSetX sorted(Function function) { - - return (LazyPSetX)super.sorted(function); + + return (LazyPSetX) super.sorted(function); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusLazy(java.lang.Object) */ @Override public LazyPSetX plusLazy(T e) { - - return (LazyPSetX)super.plusLazy(e); + + return (LazyPSetX) super.plusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusAllLazy(java.util.Collection) */ @Override public LazyPSetX plusAllLazy(Collection list) { - - return (LazyPSetX)super.plusAllLazy(list); + + return (LazyPSetX) super.plusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusLazy(java.lang.Object) */ @Override public LazyPSetX minusLazy(Object e) { - - return (LazyPSetX)super.minusLazy(e); + + return (LazyPSetX) super.minusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAllLazy(java.util.Collection) */ @Override public LazyPSetX minusAllLazy(Collection list) { - - return (LazyPSetX)super.minusAllLazy(list); + + return (LazyPSetX) super.minusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(int) */ @Override public LazyPStackX cycle(int times) { - return LazyPStackX.fromPublisher(Flux.from(this.stream().cycle(times))); + return LazyPStackX.fromPublisher(Flux.from(this.stream() + .cycle(times))); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) */ @Override public LazyPStackX cycle(Monoid m, int times) { - return LazyPStackX.fromPublisher(Flux.from(this.stream().cycle(m,times))); + return LazyPStackX.fromPublisher(Flux.from(this.stream() + .cycle(m, times))); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) */ @Override public LazyPStackX cycleWhile(Predicate predicate) { - return LazyPStackX.fromPublisher(Flux.from(this.stream().cycleWhile(predicate))); + return LazyPStackX.fromPublisher(Flux.from(this.stream() + .cycleWhile(predicate))); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) */ @Override public LazyPStackX cycleUntil(Predicate predicate) { - return LazyPStackX.fromPublisher(Flux.from(this.stream().cycleUntil(predicate))); + return LazyPStackX.fromPublisher(Flux.from(this.stream() + .cycleUntil(predicate))); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) */ @Override public LazyPSetX> zip(Seq other) { - - return (LazyPSetX)super.zip(other); + + return (LazyPSetX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip3(java.util.stream.Stream, + * java.util.stream.Stream) */ @Override public LazyPSetX> zip3(Stream second, Stream third) { - - return (LazyPSetX)super.zip3(second, third); + + return (LazyPSetX) super.zip3(second, third); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip4(java.util.stream.Stream, + * java.util.stream.Stream, java.util.stream.Stream) */ @Override public LazyPSetX> zip4(Stream second, Stream third, Stream fourth) { - - return (LazyPSetX)super.zip4(second, third, fourth); + + return (LazyPSetX) super.zip4(second, third, fourth); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zipWithIndex() */ @Override public LazyPSetX> zipWithIndex() { - - return (LazyPSetX>)super.zipWithIndex(); + + return (LazyPSetX>) super.zipWithIndex(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#distinct() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#distinct() */ @Override public LazyPSetX distinct() { - - return (LazyPSetX)super.distinct(); + + return (LazyPSetX) super.distinct(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted() */ @Override public LazyPSetX sorted() { - - return (LazyPSetX)super.sorted(); + + return (LazyPSetX) super.sorted(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.Comparator) */ @Override public LazyPSetX sorted(Comparator c) { - - return (LazyPSetX)super.sorted(c); + + return (LazyPSetX) super.sorted(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) */ @Override public LazyPSetX skipWhile(Predicate p) { - - return (LazyPSetX)super.skipWhile(p); + + return (LazyPSetX) super.skipWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) */ @Override public LazyPSetX skipUntil(Predicate p) { - - return (LazyPSetX)super.skipUntil(p); + + return (LazyPSetX) super.skipUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) */ @Override public LazyPSetX limitWhile(Predicate p) { - - return (LazyPSetX)super.limitWhile(p); + + return (LazyPSetX) super.limitWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) */ @Override public LazyPSetX limitUntil(Predicate p) { - - return (LazyPSetX)super.limitUntil(p); + + return (LazyPSetX) super.limitUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#intersperse(java.lang.Object) */ @Override public LazyPSetX intersperse(T value) { - - return (LazyPSetX)super.intersperse(value); + + return (LazyPSetX) super.intersperse(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle() */ @Override public LazyPSetX shuffle() { - - return (LazyPSetX)super.shuffle(); + + return (LazyPSetX) super.shuffle(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipLast(int) */ @Override public LazyPSetX skipLast(int num) { - - return (LazyPSetX)super.skipLast(num); + + return (LazyPSetX) super.skipLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitLast(int) */ @Override public LazyPSetX limitLast(int num) { - - return (LazyPSetX)super.limitLast(num); + + return (LazyPSetX) super.limitLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmpty(java.lang.Object) */ @Override public LazyPSetX onEmpty(T value) { - - return (LazyPSetX)super.onEmpty(value); + + return (LazyPSetX) super.onEmpty(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) */ @Override public LazyPSetX onEmptyGet(Supplier supplier) { - - return (LazyPSetX)super.onEmptyGet(supplier); + + return (LazyPSetX) super.onEmptyGet(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) */ @Override public LazyPSetX onEmptyThrow(Supplier supplier) { - - return (LazyPSetX)super.onEmptyThrow(supplier); + + return (LazyPSetX) super.onEmptyThrow(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle(java.util.Random) */ @Override public LazyPSetX shuffle(Random random) { - - return (LazyPSetX)super.shuffle(random); + + return (LazyPSetX) super.shuffle(random); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#ofType(java.lang.Class) */ @Override public LazyPSetX ofType(Class type) { - - return (LazyPSetX)super.ofType(type); + + return (LazyPSetX) super.ofType(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filterNot(java.util.function.Predicate) */ @Override public LazyPSetX filterNot(Predicate fn) { - - return (LazyPSetX)super.filterNot(fn); + + return (LazyPSetX) super.filterNot(fn); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#notNull() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#notNull() */ @Override public LazyPSetX notNull() { - - return (LazyPSetX)super.notNull(); + + return (LazyPSetX) super.notNull(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.util.stream.Stream) */ @Override public LazyPSetX removeAll(Stream stream) { - - return (LazyPSetX)(super.removeAll(stream)); + + return (LazyPSetX) (super.removeAll(stream)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) */ @Override public LazyPSetX removeAll(Seq stream) { - - return (LazyPSetX)super.removeAll(stream); + + return (LazyPSetX) super.removeAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Iterable) */ @Override public LazyPSetX removeAll(Iterable it) { - - return (LazyPSetX)super.removeAll(it); + + return (LazyPSetX) super.removeAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Object[]) */ @Override public LazyPSetX removeAll(T... values) { - - return (LazyPSetX)super.removeAll(values); + + return (LazyPSetX) super.removeAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Iterable) */ @Override public LazyPSetX retainAll(Iterable it) { - - return (LazyPSetX)super.retainAll(it); + + return (LazyPSetX) super.retainAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.util.stream.Stream) */ @Override public LazyPSetX retainAll(Stream stream) { - - return (LazyPSetX)super.retainAll(stream); + + return (LazyPSetX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) */ @Override public LazyPSetX retainAll(Seq stream) { - - return (LazyPSetX)super.retainAll(stream); + + return (LazyPSetX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Object[]) */ @Override public LazyPSetX retainAll(T... values) { - - return (LazyPSetX)super.retainAll(values); + + return (LazyPSetX) super.retainAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cast(java.lang.Class) */ @Override public LazyPSetX cast(Class type) { - - return (LazyPSetX)super.cast(type); + + return (LazyPSetX) super.cast(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#patternMatch(java.util.function.Function, + * java.util.function.Supplier) */ @Override public LazyPSetX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyPSetX)super.patternMatch(case1, otherwise); + + return (LazyPSetX) super.patternMatch(case1, otherwise); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#permutations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#permutations() */ @Override public LazyPSetX> permutations() { - - return (LazyPSetX>)super.permutations(); + + return (LazyPSetX>) super.permutations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations(int) */ @Override public LazyPSetX> combinations(int size) { - - return (LazyPSetX>)super.combinations(size); + + return (LazyPSetX>) super.combinations(size); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations() */ @Override public LazyPSetX> combinations() { - - return (LazyPSetX>)super.combinations(); + + return (LazyPSetX>) super.combinations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) */ @Override public > LazyPSetX grouped(int size, Supplier supplier) { - - return (LazyPSetX)super.grouped(size, supplier); + + return (LazyPSetX) super.grouped(size, supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) */ @Override public LazyPSetX> groupedUntil(Predicate predicate) { - - return (LazyPSetX>)super.groupedUntil(predicate); + + return (LazyPSetX>) super.groupedUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) */ @Override public LazyPSetX> groupedWhile(Predicate predicate) { - - return (LazyPSetX>)super.groupedWhile(predicate); + + return (LazyPSetX>) super.groupedWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPSetX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyPSetX)super.groupedWhile(predicate, factory); + + return (LazyPSetX) super.groupedWhile(predicate, factory); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPSetX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyPSetX)super.groupedUntil(predicate, factory); + + return (LazyPSetX) super.groupedUntil(predicate, factory); } - + /** PStackX methods **/ - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, + * java.lang.Object) */ - public LazyPSetX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyPSetX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyPSetX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyPSetX>)super.groupedStatefullyUntil(predicate); + + return (LazyPSetX>) super.groupedStatefullyUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyPSetX peek(Consumer c) { - - return (LazyPSetX)super.peek(c); + + return (LazyPSetX) super.peek(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazyPSetX zip(Seq other, - BiFunction zipper) { - - return (LazyPSetX)super.zip(other, zipper); + public LazyPSetX zip(Seq other, BiFunction zipper) { + + return (LazyPSetX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazyPSetX zip(Stream other, - BiFunction zipper) { - - return (LazyPSetX)super.zip(other, zipper); + public LazyPSetX zip(Stream other, BiFunction zipper) { + + return (LazyPSetX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyPSetX> zip(Stream other) { - - return (LazyPSetX)super.zip(other); + + return (LazyPSetX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyPSetX zip(BiFunction fn, Publisher publisher) { - - return (LazyPSetX)super.zip(fn, publisher); + + return (LazyPSetX) super.zip(fn, publisher); } - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazyPSetX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); - + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); + } - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit(Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit( + * Collection) */ @Override public LazyPSetX unit(Collection col) { - + return fromIterable(col); } - + @Override public LazyPSetX unit(R value) { return singleton(value); } @Override - public LazyPSetX unitIterator(Iterator it) { + public LazyPSetX unitIterator(Iterator it) { return fromIterable(() -> it); } @Override public LazyPSetX emptyUnit() { - + return LazyPSetX. empty(); } @@ -1289,15 +1591,21 @@ public LazyPSetX toPVector() { return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazyPSetX plusInOrder(T e) { return plus(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.CollectionX#stream() */ @Override @@ -1305,63 +1613,75 @@ public ReactiveSeq stream() { return ReactiveSeq.fromIterable(this); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazyPSetX from(Collection col) { return fromIterable(col); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PQueueX#monoid() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PQueueX#monoid() */ @Override public Reducer> monoid() { - + return Reducers.toPSet(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plus(java.lang.Object) */ @Override public LazyPSetX plus(T e) { - return new LazyPSetX(getSet().plus(e),this.collector); + return new LazyPSetX( + getSet().plus(e), this.collector); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plusAll(java.util.Collection) */ @Override - public LazyPSetX plusAll(Collection list) { - return new LazyPSetX(getSet().plusAll(list),this.collector); + public LazyPSetX plusAll(Collection list) { + return new LazyPSetX( + getSet().plusAll(list), this.collector); } - - - - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minus(java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minus(java.lang.Object) */ @Override - public LazyPSetX minus(Object e) { + public LazyPSetX minus(Object e) { PCollection res = getSet().minus(e); - return LazyPSetX.fromIterable(this.collector,res); - + return LazyPSetX.fromIterable(this.collector, res); + } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAll(java.util.Collection) */ public LazyPSetX minusAll(Collection list) { PCollection res = getSet().minusAll(list); - return LazyPSetX.fromIterable(this.collector,res); + return LazyPSetX.fromIterable(this.collector, res); } } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPStackX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPStackX.java index 3d35dee4..bbe87d10 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPStackX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPStackX.java @@ -44,6 +44,7 @@ import lombok.Getter; import lombok.experimental.Wither; import reactor.core.publisher.Flux; + /** * An extended Persistent List type {@see java.util.List} * This makes use of PStack (@see org.pcollections.PStack) from PCollectons. PStack is a persistent analogue of the @@ -72,30 +73,34 @@ * * @param the type of elements held in this collection */ -@AllArgsConstructor(access=AccessLevel.PRIVATE) -public class LazyPStackX extends AbstractFluentCollectionX implements PStackX { - private final LazyFluentCollection> lazy; +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class LazyPStackX extends AbstractFluentCollectionXimplements PStackX { + private final LazyFluentCollection> lazy; @Getter private final Reducer> collector; - @Wither @Getter + @Wither + @Getter private final boolean efficientOps; - public LazyPStackX efficientOpsOn(){ + public LazyPStackX efficientOpsOn() { return this.withEfficientOps(true); } - public LazyPStackX efficientOpsOff(){ + + public LazyPStackX efficientOpsOff() { return this.withEfficientOps(false); } - + /** * Create a LazyPStackX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyPStackX */ - public static LazyPStackX fromStreamS(Stream stream){ - return new LazyPStackX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyPStackX fromStreamS(Stream stream) { + return new LazyPStackX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyPStackX that contains the Integers between start and end * @@ -151,7 +156,7 @@ public static LazyPStackX unfold(U seed, Function LazyPStackX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -164,10 +169,9 @@ public static LazyPStackX generate(long limit, Supplier s) { */ public static LazyPStackX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyPStackX */ @@ -175,14 +179,13 @@ public static LazyPStackX iterate(long limit, final T seed, final UnaryOp return Collectors.toCollection(() -> LazyPStackX.of()); } - - /** * @return An empty LazyPStackX */ public static LazyPStackX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -203,8 +206,9 @@ public static LazyPStackX empty() { */ @SafeVarargs public static LazyPStackX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -258,48 +262,60 @@ public static LazyPStackX fromIterable(Iterable it) { public static LazyPStackX fromIterable(Reducer> collector, Iterable it) { if (it instanceof LazyPStackX) return (LazyPStackX) it; - + if (it instanceof PStack) return new LazyPStackX( - (PStack) it, collector); - + (PStack) it, collector); + return new LazyPStackX( - Flux.fromIterable(it), - collector); - } - private LazyPStackX(PStack list,Reducer> collector){ - this.efficientOps=true; - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; - } - private LazyPStackX(boolean efficientOps,PStack list,Reducer> collector){ - this.efficientOps=efficientOps; - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; - } - - private LazyPStackX(PStack list){ - this.efficientOps=true; + Flux.fromIterable(it), collector); + } + + private LazyPStackX(PStack list, Reducer> collector) { + this.efficientOps = true; + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; + } + + private LazyPStackX(boolean efficientOps, PStack list, Reducer> collector) { + this.efficientOps = efficientOps; + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; + } + + private LazyPStackX(PStack list) { + this.efficientOps = true; this.collector = Reducers.toPStack(); - this.lazy = new PersistentLazyCollection>(list,null,Reducers.toPStack()); + this.lazy = new PersistentLazyCollection>( + list, null, Reducers.toPStack()); } - private LazyPStackX(Flux stream,Reducer> collector){ - this.efficientOps=true; + + private LazyPStackX(Flux stream, Reducer> collector) { + this.efficientOps = true; this.collector = collector; - this.lazy = new PersistentLazyCollection<>(null,stream,Reducers.toPStack()); + this.lazy = new PersistentLazyCollection<>( + null, stream, Reducers.toPStack()); } - private LazyPStackX(Flux stream){ - this.efficientOps=true; + + private LazyPStackX(Flux stream) { + this.efficientOps = true; this.collector = Reducers.toPStack(); - this.lazy = new PersistentLazyCollection<>(null,stream,collector); + this.lazy = new PersistentLazyCollection<>( + null, stream, collector); } - private LazyPStackX(){ - this.efficientOps=true; + + private LazyPStackX() { + this.efficientOps = true; this.collector = Reducers.toPStack(); - this.lazy = new PersistentLazyCollection<>((PStack)this.collector.zero(),null,collector); + this.lazy = new PersistentLazyCollection<>( + (PStack) this.collector.zero(), null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -307,7 +323,9 @@ public void forEach(Consumer action) { getStack().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -315,7 +333,9 @@ public Iterator iterator() { return getStack().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -323,7 +343,9 @@ public int size() { return getStack().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -331,7 +353,9 @@ public boolean contains(Object e) { return getStack().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -339,9 +363,9 @@ public boolean equals(Object o) { return getStack().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -349,7 +373,9 @@ public boolean isEmpty() { return getStack().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -357,7 +383,9 @@ public int hashCode() { return getStack().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -365,7 +393,9 @@ public Object[] toArray() { return getStack().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -373,7 +403,9 @@ public boolean removeAll(Collection c) { return getStack().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -381,7 +413,9 @@ public T[] toArray(T[] a) { return getStack().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -389,7 +423,9 @@ public boolean add(T e) { return getStack().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -397,7 +433,9 @@ public boolean remove(Object o) { return getStack().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -405,7 +443,9 @@ public boolean containsAll(Collection c) { return getStack().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -413,7 +453,9 @@ public boolean addAll(Collection c) { return getStack().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -421,7 +463,9 @@ public boolean retainAll(Collection c) { return getStack().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -429,8 +473,9 @@ public void clear() { getStack().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -438,7 +483,9 @@ public String toString() { return getStack().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -446,928 +493,1223 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#addAll(int, java.util.Collection) */ @Override public boolean addAll(int index, Collection c) { return getStack().addAll(index, c); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#replaceAll(java.util.function.UnaryOperator) */ @Override public void replaceAll(UnaryOperator operator) { getStack().replaceAll(operator); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getStack().removeIf(filter); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#sort(java.util.Comparator) */ @Override - public void sort(Comparator c) { + public void sort(Comparator c) { getStack().sort(c); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#get(int) */ @Override public T get(int index) { return getStack().get(index); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#set(int, java.lang.Object) */ @Override public T set(int index, T element) { return getStack().set(index, element); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#add(int, java.lang.Object) */ @Override public void add(int index, T element) { getStack().add(index, element); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#remove(int) */ @Override public T remove(int index) { return getStack().remove(index); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getStack().parallelStream(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#indexOf(java.lang.Object) */ @Override public int indexOf(Object o) { - // return stream().zipWithIndex().filter(t->Objects.equals(t.v1,o)).findFirst().get().v2.intValue(); + // return + // stream().zipWithIndex().filter(t->Objects.equals(t.v1,o)).findFirst().get().v2.intValue(); return getStack().indexOf(o); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#lastIndexOf(java.lang.Object) */ @Override public int lastIndexOf(Object o) { return getStack().lastIndexOf(o); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#listIterator() */ @Override public ListIterator listIterator() { return getStack().listIterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#listIterator(int) */ @Override public ListIterator listIterator(int index) { return getStack().listIterator(index); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#subList(int, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#subList(int, + * int) */ @Override public LazyPStackX subList(int fromIndex, int toIndex) { - return new LazyPStackX(getStack().subList(fromIndex, toIndex),getCollector()); + return new LazyPStackX( + getStack().subList(fromIndex, toIndex), getCollector()); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getStack().spliterator(); } - + /** * @return PStack */ private PStack getStack() { return lazy.get(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyPStackX stream(Flux stream){ - return new LazyPStackX(stream); + public LazyPStackX stream(Flux stream) { + return new LazyPStackX( + stream); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flux() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flux() */ @Override public Flux flux() { return lazy.flux(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combine(java.util.function.BiPredicate, + * java.util.function.BinaryOperator) */ @Override public LazyPStackX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyPStackX)super.combine(predicate, op); + + return (LazyPStackX) super.combine(predicate, op); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#reverse() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#reverse() */ @Override public LazyPStackX reverse() { - - return(LazyPStackX)super.reverse(); + + return (LazyPStackX) super.reverse(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filter(java.util.function.Predicate) */ @Override public LazyPStackX filter(Predicate pred) { - - return (LazyPStackX)super.filter(pred); + + return (LazyPStackX) super.filter(pred); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#map(java.util.function.Function) */ @Override public LazyPStackX map(Function mapper) { - - return (LazyPStackX)super.map(mapper); + + return (LazyPStackX) super.map(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flatMap(java.util.function.Function) */ @Override public LazyPStackX flatMap(Function> mapper) { - return (LazyPStackX)super.flatMap(mapper); + return (LazyPStackX) super.flatMap(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limit(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limit(long) */ @Override public LazyPStackX limit(long num) { - return (LazyPStackX)super.limit(num); + return (LazyPStackX) super.limit(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skip(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skip(long) */ @Override public LazyPStackX skip(long num) { - return (LazyPStackX)super.skip(num); + return (LazyPStackX) super.skip(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeRight(int) */ @Override public LazyPStackX takeRight(int num) { - return (LazyPStackX)super.takeRight(num); + return (LazyPStackX) super.takeRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropRight(int) */ @Override public LazyPStackX dropRight(int num) { - return (LazyPStackX)super.dropRight(num); + return (LazyPStackX) super.dropRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) */ @Override public LazyPStackX takeWhile(Predicate p) { - return (LazyPStackX)super.takeWhile(p); + return (LazyPStackX) super.takeWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) */ @Override public LazyPStackX dropWhile(Predicate p) { - return (LazyPStackX)super.dropWhile(p); + return (LazyPStackX) super.dropWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) */ @Override public LazyPStackX takeUntil(Predicate p) { - return (LazyPStackX)super.takeUntil(p); + return (LazyPStackX) super.takeUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) */ @Override public LazyPStackX dropUntil(Predicate p) { - return(LazyPStackX)super.dropUntil(p); + return (LazyPStackX) super.dropUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#trampoline(java.util.function.Function) */ @Override public LazyPStackX trampoline(Function> mapper) { - return (LazyPStackX)super.trampoline(mapper); + return (LazyPStackX) super.trampoline(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#slice(long, long) */ @Override public LazyPStackX slice(long from, long to) { - return (LazyPStackX)super.slice(from, to); + return (LazyPStackX) super.slice(from, to); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int) */ @Override public LazyPStackX> grouped(int groupSize) { - - return (LazyPStackX>)super.grouped(groupSize); + + return (LazyPStackX>) super.grouped(groupSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function, + * java.util.stream.Collector) */ @Override public LazyPStackX> grouped(Function classifier, Collector downstream) { - - return (LazyPStackX)super.grouped(classifier, downstream); + + return (LazyPStackX) super.grouped(classifier, downstream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function) */ @Override public LazyPStackX>> grouped(Function classifier) { - - return (LazyPStackX)super.grouped(classifier); + + return (LazyPStackX) super.grouped(classifier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable) */ @Override public LazyPStackX> zip(Iterable other) { - - return (LazyPStackX)super.zip(other); + + return (LazyPStackX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable, + * java.util.function.BiFunction) */ @Override - public LazyPStackX zip(Iterable other, BiFunction zipper) { - - return (LazyPStackX)super.zip(other, zipper); + public LazyPStackX zip(Iterable other, + BiFunction zipper) { + + return (LazyPStackX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int) */ @Override public LazyPStackX> sliding(int windowSize) { - - return (LazyPStackX>)super.sliding(windowSize); + + return (LazyPStackX>) super.sliding(windowSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int, int) */ @Override public LazyPStackX> sliding(int windowSize, int increment) { - - return (LazyPStackX>)super.sliding(windowSize, increment); + + return (LazyPStackX>) super.sliding(windowSize, increment); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) */ @Override public LazyPStackX scanLeft(Monoid monoid) { - - return (LazyPStackX)super.scanLeft(monoid); + + return (LazyPStackX) super.scanLeft(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPStackX scanLeft(U seed, BiFunction function) { - + return (LazyPStackX) super.scanLeft(seed, function); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) */ @Override public LazyPStackX scanRight(Monoid monoid) { - - return (LazyPStackX)super.scanRight(monoid); + + return (LazyPStackX) super.scanRight(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPStackX scanRight(U identity, BiFunction combiner) { - - return (LazyPStackX)super.scanRight(identity, combiner); + + return (LazyPStackX) super.scanRight(identity, combiner); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.function.Function) */ @Override public > LazyPStackX sorted(Function function) { - - return (LazyPStackX)super.sorted(function); + + return (LazyPStackX) super.sorted(function); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusLazy(java.lang.Object) */ @Override public LazyPStackX plusLazy(T e) { - - return (LazyPStackX)super.plusLazy(e); + + return (LazyPStackX) super.plusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusAllLazy(java.util.Collection) */ @Override public LazyPStackX plusAllLazy(Collection list) { - - return (LazyPStackX)super.plusAllLazy(list); + + return (LazyPStackX) super.plusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusLazy(java.lang.Object) */ @Override public LazyPStackX minusLazy(Object e) { - - return (LazyPStackX)super.minusLazy(e); + + return (LazyPStackX) super.minusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAllLazy(java.util.Collection) */ @Override public LazyPStackX minusAllLazy(Collection list) { - - return (LazyPStackX)super.minusAllLazy(list); + + return (LazyPStackX) super.minusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(int) */ @Override public LazyPStackX cycle(int times) { - - return (LazyPStackX)super.cycle(times); + + return (LazyPStackX) super.cycle(times); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) */ @Override public LazyPStackX cycle(Monoid m, int times) { - - return (LazyPStackX)super.cycle(m, times); + + return (LazyPStackX) super.cycle(m, times); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) */ @Override public LazyPStackX cycleWhile(Predicate predicate) { - - return (LazyPStackX)super.cycleWhile(predicate); + + return (LazyPStackX) super.cycleWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) */ @Override public LazyPStackX cycleUntil(Predicate predicate) { - - return (LazyPStackX)super.cycleUntil(predicate); + + return (LazyPStackX) super.cycleUntil(predicate); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) */ @Override public LazyPStackX> zip(Seq other) { - - return (LazyPStackX)super.zip(other); + + return (LazyPStackX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip3(java.util.stream.Stream, + * java.util.stream.Stream) */ @Override public LazyPStackX> zip3(Stream second, Stream third) { - - return (LazyPStackX)super.zip3(second, third); + + return (LazyPStackX) super.zip3(second, third); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip4(java.util.stream.Stream, + * java.util.stream.Stream, java.util.stream.Stream) */ @Override public LazyPStackX> zip4(Stream second, Stream third, Stream fourth) { - - return (LazyPStackX)super.zip4(second, third, fourth); + + return (LazyPStackX) super.zip4(second, third, fourth); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zipWithIndex() */ @Override public LazyPStackX> zipWithIndex() { - - return (LazyPStackX>)super.zipWithIndex(); + + return (LazyPStackX>) super.zipWithIndex(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#distinct() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#distinct() */ @Override public LazyPStackX distinct() { - - return (LazyPStackX)super.distinct(); + + return (LazyPStackX) super.distinct(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted() */ @Override public LazyPStackX sorted() { - - return (LazyPStackX)super.sorted(); + + return (LazyPStackX) super.sorted(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.Comparator) */ @Override public LazyPStackX sorted(Comparator c) { - - return (LazyPStackX)super.sorted(c); + + return (LazyPStackX) super.sorted(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) */ @Override public LazyPStackX skipWhile(Predicate p) { - - return (LazyPStackX)super.skipWhile(p); + + return (LazyPStackX) super.skipWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) */ @Override public LazyPStackX skipUntil(Predicate p) { - - return (LazyPStackX)super.skipUntil(p); + + return (LazyPStackX) super.skipUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) */ @Override public LazyPStackX limitWhile(Predicate p) { - - return (LazyPStackX)super.limitWhile(p); + + return (LazyPStackX) super.limitWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) */ @Override public LazyPStackX limitUntil(Predicate p) { - - return (LazyPStackX)super.limitUntil(p); + + return (LazyPStackX) super.limitUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#intersperse(java.lang.Object) */ @Override public LazyPStackX intersperse(T value) { - - return (LazyPStackX)super.intersperse(value); + + return (LazyPStackX) super.intersperse(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle() */ @Override public LazyPStackX shuffle() { - - return (LazyPStackX)super.shuffle(); + + return (LazyPStackX) super.shuffle(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipLast(int) */ @Override public LazyPStackX skipLast(int num) { - - return (LazyPStackX)super.skipLast(num); + + return (LazyPStackX) super.skipLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitLast(int) */ @Override public LazyPStackX limitLast(int num) { - - return (LazyPStackX)super.limitLast(num); + + return (LazyPStackX) super.limitLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmpty(java.lang.Object) */ @Override public LazyPStackX onEmpty(T value) { - - return (LazyPStackX)super.onEmpty(value); + + return (LazyPStackX) super.onEmpty(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) */ @Override public LazyPStackX onEmptyGet(Supplier supplier) { - - return (LazyPStackX)super.onEmptyGet(supplier); + + return (LazyPStackX) super.onEmptyGet(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) */ @Override public LazyPStackX onEmptyThrow(Supplier supplier) { - - return (LazyPStackX)super.onEmptyThrow(supplier); + + return (LazyPStackX) super.onEmptyThrow(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle(java.util.Random) */ @Override public LazyPStackX shuffle(Random random) { - - return (LazyPStackX)super.shuffle(random); + + return (LazyPStackX) super.shuffle(random); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#ofType(java.lang.Class) */ @Override public LazyPStackX ofType(Class type) { - - return (LazyPStackX)super.ofType(type); + + return (LazyPStackX) super.ofType(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filterNot(java.util.function.Predicate) */ @Override public LazyPStackX filterNot(Predicate fn) { - - return (LazyPStackX)super.filterNot(fn); + + return (LazyPStackX) super.filterNot(fn); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#notNull() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#notNull() */ @Override public LazyPStackX notNull() { - - return (LazyPStackX)super.notNull(); + + return (LazyPStackX) super.notNull(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.util.stream.Stream) */ @Override public LazyPStackX removeAll(Stream stream) { - - return (LazyPStackX)(super.removeAll(stream)); + + return (LazyPStackX) (super.removeAll(stream)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) */ @Override public LazyPStackX removeAll(Seq stream) { - - return (LazyPStackX)super.removeAll(stream); + + return (LazyPStackX) super.removeAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Iterable) */ @Override public LazyPStackX removeAll(Iterable it) { - - return (LazyPStackX)super.removeAll(it); + + return (LazyPStackX) super.removeAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Object[]) */ @Override public LazyPStackX removeAll(T... values) { - - return (LazyPStackX)super.removeAll(values); + + return (LazyPStackX) super.removeAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Iterable) */ @Override public LazyPStackX retainAll(Iterable it) { - - return (LazyPStackX)super.retainAll(it); + + return (LazyPStackX) super.retainAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.util.stream.Stream) */ @Override public LazyPStackX retainAll(Stream stream) { - - return (LazyPStackX)super.retainAll(stream); + + return (LazyPStackX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) */ @Override public LazyPStackX retainAll(Seq stream) { - - return (LazyPStackX)super.retainAll(stream); + + return (LazyPStackX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Object[]) */ @Override public LazyPStackX retainAll(T... values) { - - return (LazyPStackX)super.retainAll(values); + + return (LazyPStackX) super.retainAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cast(java.lang.Class) */ @Override public LazyPStackX cast(Class type) { - - return (LazyPStackX)super.cast(type); + + return (LazyPStackX) super.cast(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#patternMatch(java.util.function.Function, + * java.util.function.Supplier) */ @Override public LazyPStackX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyPStackX)super.patternMatch(case1, otherwise); + + return (LazyPStackX) super.patternMatch(case1, otherwise); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#permutations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#permutations() */ @Override public LazyPStackX> permutations() { - - return (LazyPStackX>)super.permutations(); + + return (LazyPStackX>) super.permutations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations(int) */ @Override public LazyPStackX> combinations(int size) { - - return (LazyPStackX>)super.combinations(size); + + return (LazyPStackX>) super.combinations(size); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations() */ @Override public LazyPStackX> combinations() { - - return (LazyPStackX>)super.combinations(); + + return (LazyPStackX>) super.combinations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) */ @Override public > LazyPStackX grouped(int size, Supplier supplier) { - - return (LazyPStackX)super.grouped(size, supplier); + + return (LazyPStackX) super.grouped(size, supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) */ @Override public LazyPStackX> groupedUntil(Predicate predicate) { - - return (LazyPStackX>)super.groupedUntil(predicate); + + return (LazyPStackX>) super.groupedUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) */ @Override public LazyPStackX> groupedWhile(Predicate predicate) { - - return (LazyPStackX>)super.groupedWhile(predicate); + + return (LazyPStackX>) super.groupedWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPStackX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyPStackX)super.groupedWhile(predicate, factory); + + return (LazyPStackX) super.groupedWhile(predicate, factory); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPStackX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyPStackX)super.groupedUntil(predicate, factory); + + return (LazyPStackX) super.groupedUntil(predicate, factory); } - + /** PStackX methods **/ - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, + * java.lang.Object) */ - public LazyPStackX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyPStackX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyPStackX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyPStackX>)super.groupedStatefullyUntil(predicate); + + return (LazyPStackX>) super.groupedStatefullyUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyPStackX peek(Consumer c) { - - return (LazyPStackX)super.peek(c); + + return (LazyPStackX) super.peek(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazyPStackX zip(Seq other, - BiFunction zipper) { - - return (LazyPStackX)super.zip(other, zipper); + public LazyPStackX zip(Seq other, BiFunction zipper) { + + return (LazyPStackX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazyPStackX zip(Stream other, - BiFunction zipper) { - - return (LazyPStackX)super.zip(other, zipper); + public LazyPStackX zip(Stream other, BiFunction zipper) { + + return (LazyPStackX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyPStackX> zip(Stream other) { - - return (LazyPStackX)super.zip(other); + + return (LazyPStackX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyPStackX zip(BiFunction fn, Publisher publisher) { - - return (LazyPStackX)super.zip(fn, publisher); + + return (LazyPStackX) super.zip(fn, publisher); } - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazyPStackX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); - - } - + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); - + } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.PStack#subList(int) */ @Override public LazyPStackX subList(int start) { return stream(flux().take(start)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit(Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit( + * Collection) */ @Override public LazyPStackX unit(Collection col) { @@ -1375,14 +1717,14 @@ public LazyPStackX unit(Collection col) { return fromIterable(col); return fromIterable(col).efficientOpsOff(); } - + @Override public LazyPStackX unit(R value) { return singleton(value); } @Override - public LazyPStackX unitIterator(Iterator it) { + public LazyPStackX unitIterator(Iterator it) { return fromIterable(() -> it); } @@ -1391,7 +1733,7 @@ public LazyPStackX emptyUnit() { if (isEfficientOps()) return empty(); return LazyPStackX. empty() - .efficientOpsOff(); + .efficientOpsOff(); } /** @@ -1413,12 +1755,14 @@ public ReactiveSeq stream() { return ReactiveSeq.fromIterable(this); } + @Override public LazyPStackX from(Collection col) { if (isEfficientOps()) return fromIterable(col); return fromIterable(col).efficientOpsOff(); } + @Override public Reducer> monoid() { if (isEfficientOps()) @@ -1426,52 +1770,75 @@ public Reducer> monoid() { return Reducers.toPStack(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plus(java.lang.Object) */ public LazyPStackX plus(T e) { - return new LazyPStackX(efficientOps,getStack().plus(e),this.collector); + return new LazyPStackX( + efficientOps, getStack().plus(e), this.collector); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.PStack#plus(int, java.lang.Object) */ public LazyPStackX plus(int i, T e) { - return new LazyPStackX(efficientOps,getStack().plus(i,e),this.collector); + return new LazyPStackX( + efficientOps, getStack().plus(i, e), this.collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#minus(java.lang.Object) */ - public LazyPStackX minus(Object e) { - return new LazyPStackX(efficientOps,getStack().minus(e),this.collector); + public LazyPStackX minus(Object e) { + return new LazyPStackX( + efficientOps, getStack().minus(e), this.collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plusAll(java.util.Collection) */ - public LazyPStackX plusAll(Collection list) { - return new LazyPStackX(efficientOps,getStack().plusAll(list),this.collector); + public LazyPStackX plusAll(Collection list) { + return new LazyPStackX( + efficientOps, getStack().plusAll(list), this.collector); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.PStack#plusAll(int, java.util.Collection) */ public LazyPStackX plusAll(int i, Collection list) { - return new LazyPStackX(efficientOps,getStack().plusAll(i,list),this.collector); + return new LazyPStackX( + efficientOps, getStack().plusAll(i, list), this.collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#minusAll(java.util.Collection) */ public LazyPStackX minusAll(Collection list) { - return new LazyPStackX(efficientOps,getStack().minusAll(list),this.collector); + return new LazyPStackX( + efficientOps, getStack().minusAll(list), this.collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.PStack#minus(int) */ public LazyPStackX minus(int i) { - return new LazyPStackX(efficientOps,getStack().minus(i),this.collector); + return new LazyPStackX( + efficientOps, getStack().minus(i), this.collector); } - } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPVectorX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPVectorX.java index 1c54b1a5..b745fdc5 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPVectorX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/persistent/LazyPVectorX.java @@ -45,6 +45,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; import reactor.core.publisher.Flux; + /** * An extended List type {@see java.util.List}. * This makes use of PVector (@see org.pcollections.PStack) from PCollectons. PVector is a persistent analogue of the @@ -73,24 +74,23 @@ * * @param the type of elements held in this collection */ -@AllArgsConstructor(access=AccessLevel.PRIVATE) -public class LazyPVectorX extends AbstractFluentCollectionX implements PVectorX { - private final LazyFluentCollection> lazy; +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class LazyPVectorX extends AbstractFluentCollectionXimplements PVectorX { + private final LazyFluentCollection> lazy; @Getter private final Reducer> collector; - - - /** * Create a LazyPStackX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyPStackX */ - public static LazyPVectorX fromStreamS(Stream stream){ - return new LazyPVectorX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyPVectorX fromStreamS(Stream stream) { + return new LazyPVectorX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyPStackX that contains the Integers between start and end * @@ -146,7 +146,7 @@ public static LazyPVectorX unfold(U seed, Function LazyPVectorX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -159,10 +159,9 @@ public static LazyPVectorX generate(long limit, Supplier s) { */ public static LazyPVectorX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyPStackX */ @@ -170,14 +169,13 @@ public static LazyPVectorX iterate(long limit, final T seed, final UnaryO return Collectors.toCollection(() -> LazyPVectorX.of()); } - - /** * @return An empty LazyPStackX */ public static LazyPVectorX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -198,8 +196,9 @@ public static LazyPVectorX empty() { */ @SafeVarargs public static LazyPVectorX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -253,42 +252,54 @@ public static LazyPVectorX fromIterable(Iterable it) { public static LazyPVectorX fromIterable(Reducer> collector, Iterable it) { if (it instanceof LazyPVectorX) return (LazyPVectorX) it; - + if (it instanceof PVector) return new LazyPVectorX( - (PVector) it, collector); - + (PVector) it, collector); + return new LazyPVectorX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazyPVectorX(PVector list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPVectorX(PVector list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - private LazyPVectorX(boolean efficientOps,PVector list,Reducer> collector){ - this.lazy = new PersistentLazyCollection>(list,null,collector); - this.collector= collector; + + private LazyPVectorX(boolean efficientOps, PVector list, Reducer> collector) { + this.lazy = new PersistentLazyCollection>( + list, null, collector); + this.collector = collector; } - - private LazyPVectorX(PVector list){ + + private LazyPVectorX(PVector list) { this.collector = Reducers.toPVector(); - this.lazy = new PersistentLazyCollection>(list,null,Reducers.toPVector()); + this.lazy = new PersistentLazyCollection>( + list, null, Reducers.toPVector()); } - private LazyPVectorX(Flux stream,Reducer> collector){ + + private LazyPVectorX(Flux stream, Reducer> collector) { this.collector = collector; - this.lazy = new PersistentLazyCollection<>(null,stream,Reducers.toPVector()); + this.lazy = new PersistentLazyCollection<>( + null, stream, Reducers.toPVector()); } - private LazyPVectorX(Flux stream){ + + private LazyPVectorX(Flux stream) { this.collector = Reducers.toPVector(); - this.lazy = new PersistentLazyCollection<>(null,stream,collector); + this.lazy = new PersistentLazyCollection<>( + null, stream, collector); } - private LazyPVectorX(){ + + private LazyPVectorX() { this.collector = Reducers.toPVector(); - this.lazy = new PersistentLazyCollection<>((PVector)this.collector.zero(),null,collector); + this.lazy = new PersistentLazyCollection<>( + (PVector) this.collector.zero(), null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -296,7 +307,9 @@ public void forEach(Consumer action) { getVector().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -304,7 +317,9 @@ public Iterator iterator() { return getVector().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -312,7 +327,9 @@ public int size() { return getVector().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -320,7 +337,9 @@ public boolean contains(Object e) { return getVector().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -328,9 +347,9 @@ public boolean equals(Object o) { return getVector().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -338,7 +357,9 @@ public boolean isEmpty() { return getVector().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -346,7 +367,9 @@ public int hashCode() { return getVector().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -354,7 +377,9 @@ public Object[] toArray() { return getVector().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -362,7 +387,9 @@ public boolean removeAll(Collection c) { return getVector().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -370,7 +397,9 @@ public T[] toArray(T[] a) { return getVector().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -378,7 +407,9 @@ public boolean add(T e) { return getVector().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -386,7 +417,9 @@ public boolean remove(Object o) { return getVector().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -394,7 +427,9 @@ public boolean containsAll(Collection c) { return getVector().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -402,7 +437,9 @@ public boolean addAll(Collection c) { return getVector().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -410,7 +447,9 @@ public boolean retainAll(Collection c) { return getVector().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -418,8 +457,9 @@ public void clear() { getVector().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -427,7 +467,9 @@ public String toString() { return getVector().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -435,926 +477,1223 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#addAll(int, java.util.Collection) */ @Override public boolean addAll(int index, Collection c) { return getVector().addAll(index, c); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#replaceAll(java.util.function.UnaryOperator) */ @Override public void replaceAll(UnaryOperator operator) { getVector().replaceAll(operator); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getVector().removeIf(filter); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#sort(java.util.Comparator) */ @Override - public void sort(Comparator c) { + public void sort(Comparator c) { getVector().sort(c); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#get(int) */ @Override public T get(int index) { return getVector().get(index); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#set(int, java.lang.Object) */ @Override public T set(int index, T element) { return getVector().set(index, element); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#add(int, java.lang.Object) */ @Override public void add(int index, T element) { getVector().add(index, element); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#remove(int) */ @Override public T remove(int index) { return getVector().remove(index); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getVector().parallelStream(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#indexOf(java.lang.Object) */ @Override public int indexOf(Object o) { - // return stream().zipWithIndex().filter(t->Objects.equals(t.v1,o)).findFirst().get().v2.intValue(); + // return + // stream().zipWithIndex().filter(t->Objects.equals(t.v1,o)).findFirst().get().v2.intValue(); return getVector().indexOf(o); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#lastIndexOf(java.lang.Object) */ @Override public int lastIndexOf(Object o) { return getVector().lastIndexOf(o); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#listIterator() */ @Override public ListIterator listIterator() { return getVector().listIterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#listIterator(int) */ @Override public ListIterator listIterator(int index) { return getVector().listIterator(index); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#subList(int, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#subList(int, + * int) */ @Override public LazyPVectorX subList(int fromIndex, int toIndex) { - return new LazyPVectorX(getVector().subList(fromIndex, toIndex),getCollector()); + return new LazyPVectorX( + getVector().subList(fromIndex, toIndex), getCollector()); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getVector().spliterator(); } - + /** * @return PStack */ private PVector getVector() { return lazy.get(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyPVectorX stream(Flux stream){ - return new LazyPVectorX(stream); + public LazyPVectorX stream(Flux stream) { + return new LazyPVectorX( + stream); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flux() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flux() */ @Override public Flux flux() { return lazy.flux(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combine(java.util.function.BiPredicate, + * java.util.function.BinaryOperator) */ @Override public LazyPVectorX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyPVectorX)super.combine(predicate, op); + + return (LazyPVectorX) super.combine(predicate, op); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#reverse() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#reverse() */ @Override public LazyPVectorX reverse() { - - return(LazyPVectorX)super.reverse(); + + return (LazyPVectorX) super.reverse(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filter(java.util.function.Predicate) */ @Override public LazyPVectorX filter(Predicate pred) { - - return (LazyPVectorX)super.filter(pred); + + return (LazyPVectorX) super.filter(pred); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#map(java.util.function.Function) */ @Override public LazyPVectorX map(Function mapper) { - - return (LazyPVectorX)super.map(mapper); + + return (LazyPVectorX) super.map(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#flatMap(java.util.function.Function) */ @Override public LazyPVectorX flatMap(Function> mapper) { - return (LazyPVectorX)super.flatMap(mapper); + return (LazyPVectorX) super.flatMap(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limit(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limit(long) */ @Override public LazyPVectorX limit(long num) { - return (LazyPVectorX)super.limit(num); + return (LazyPVectorX) super.limit(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skip(long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skip(long) */ @Override public LazyPVectorX skip(long num) { - return (LazyPVectorX)super.skip(num); + return (LazyPVectorX) super.skip(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeRight(int) */ @Override public LazyPVectorX takeRight(int num) { - return (LazyPVectorX)super.takeRight(num); + return (LazyPVectorX) super.takeRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropRight(int) */ @Override public LazyPVectorX dropRight(int num) { - return (LazyPVectorX)super.dropRight(num); + return (LazyPVectorX) super.dropRight(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeWhile(java.util.function.Predicate) */ @Override public LazyPVectorX takeWhile(Predicate p) { - return (LazyPVectorX)super.takeWhile(p); + return (LazyPVectorX) super.takeWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropWhile(java.util.function.Predicate) */ @Override public LazyPVectorX dropWhile(Predicate p) { - return (LazyPVectorX)super.dropWhile(p); + return (LazyPVectorX) super.dropWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#takeUntil(java.util.function.Predicate) */ @Override public LazyPVectorX takeUntil(Predicate p) { - return (LazyPVectorX)super.takeUntil(p); + return (LazyPVectorX) super.takeUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#dropUntil(java.util.function.Predicate) */ @Override public LazyPVectorX dropUntil(Predicate p) { - return(LazyPVectorX)super.dropUntil(p); + return (LazyPVectorX) super.dropUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#trampoline(java.util.function.Function) */ @Override public LazyPVectorX trampoline(Function> mapper) { - return (LazyPVectorX)super.trampoline(mapper); + return (LazyPVectorX) super.trampoline(mapper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#slice(long, long) */ @Override public LazyPVectorX slice(long from, long to) { - return (LazyPVectorX)super.slice(from, to); + return (LazyPVectorX) super.slice(from, to); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int) */ @Override public LazyPVectorX> grouped(int groupSize) { - - return (LazyPVectorX>)super.grouped(groupSize); + + return (LazyPVectorX>) super.grouped(groupSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function, + * java.util.stream.Collector) */ @Override public LazyPVectorX> grouped(Function classifier, Collector downstream) { - - return (LazyPVectorX)super.grouped(classifier, downstream); + + return (LazyPVectorX) super.grouped(classifier, downstream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function) */ @Override public LazyPVectorX>> grouped(Function classifier) { - - return (LazyPVectorX)super.grouped(classifier); + + return (LazyPVectorX) super.grouped(classifier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable) */ @Override public LazyPVectorX> zip(Iterable other) { - - return (LazyPVectorX)super.zip(other); + + return (LazyPVectorX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.lang.Iterable, + * java.util.function.BiFunction) */ @Override - public LazyPVectorX zip(Iterable other, BiFunction zipper) { - - return (LazyPVectorX)super.zip(other, zipper); + public LazyPVectorX zip(Iterable other, + BiFunction zipper) { + + return (LazyPVectorX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int) */ @Override public LazyPVectorX> sliding(int windowSize) { - - return (LazyPVectorX>)super.sliding(windowSize); + + return (LazyPVectorX>) super.sliding(windowSize); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sliding(int, int) */ @Override public LazyPVectorX> sliding(int windowSize, int increment) { - - return (LazyPVectorX>)super.sliding(windowSize, increment); + + return (LazyPVectorX>) super.sliding(windowSize, increment); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(com.aol.cyclops.Monoid) */ @Override public LazyPVectorX scanLeft(Monoid monoid) { - - return (LazyPVectorX)super.scanLeft(monoid); + + return (LazyPVectorX) super.scanLeft(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanLeft(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPVectorX scanLeft(U seed, BiFunction function) { - + return (LazyPVectorX) super.scanLeft(seed, function); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(com.aol.cyclops.Monoid) */ @Override public LazyPVectorX scanRight(Monoid monoid) { - - return (LazyPVectorX)super.scanRight(monoid); + + return (LazyPVectorX) super.scanRight(monoid); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#scanRight(java.lang.Object, + * java.util.function.BiFunction) */ @Override public LazyPVectorX scanRight(U identity, BiFunction combiner) { - - return (LazyPVectorX)super.scanRight(identity, combiner); + + return (LazyPVectorX) super.scanRight(identity, combiner); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.function.Function) */ @Override public > LazyPVectorX sorted(Function function) { - - return (LazyPVectorX)super.sorted(function); + + return (LazyPVectorX) super.sorted(function); } - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusLazy(java.lang.Object) */ @Override public LazyPVectorX plusLazy(T e) { - - return (LazyPVectorX)super.plusLazy(e); + + return (LazyPVectorX) super.plusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#plusAllLazy(java.util.Collection) */ @Override public LazyPVectorX plusAllLazy(Collection list) { - - return (LazyPVectorX)super.plusAllLazy(list); + + return (LazyPVectorX) super.plusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusLazy(java.lang.Object) */ @Override public LazyPVectorX minusLazy(Object e) { - - return (LazyPVectorX)super.minusLazy(e); + + return (LazyPVectorX) super.minusLazy(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#minusAllLazy(java.util.Collection) */ @Override public LazyPVectorX minusAllLazy(Collection list) { - - return (LazyPVectorX)super.minusAllLazy(list); + + return (LazyPVectorX) super.minusAllLazy(list); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(int) */ @Override public LazyPVectorX cycle(int times) { - - return (LazyPVectorX)super.cycle(times); + + return (LazyPVectorX) super.cycle(times); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycle(com.aol.cyclops.Monoid, int) */ @Override public LazyPVectorX cycle(Monoid m, int times) { - - return (LazyPVectorX)super.cycle(m, times); + + return (LazyPVectorX) super.cycle(m, times); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleWhile(java.util.function.Predicate) */ @Override public LazyPVectorX cycleWhile(Predicate predicate) { - - return (LazyPVectorX)super.cycleWhile(predicate); + + return (LazyPVectorX) super.cycleWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cycleUntil(java.util.function.Predicate) */ @Override public LazyPVectorX cycleUntil(Predicate predicate) { - - return (LazyPVectorX)super.cycleUntil(predicate); + + return (LazyPVectorX) super.cycleUntil(predicate); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq) */ @Override public LazyPVectorX> zip(Seq other) { - - return (LazyPVectorX)super.zip(other); + + return (LazyPVectorX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip3(java.util.stream.Stream, + * java.util.stream.Stream) */ @Override public LazyPVectorX> zip3(Stream second, Stream third) { - - return (LazyPVectorX)super.zip3(second, third); + + return (LazyPVectorX) super.zip3(second, third); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip4(java.util.stream.Stream, + * java.util.stream.Stream, java.util.stream.Stream) */ @Override - public LazyPVectorX> zip4(Stream second, Stream third, - Stream fourth) { - - return (LazyPVectorX)super.zip4(second, third, fourth); + public LazyPVectorX> zip4(Stream second, + Stream third, Stream fourth) { + + return (LazyPVectorX) super.zip4(second, third, fourth); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zipWithIndex() */ @Override public LazyPVectorX> zipWithIndex() { - - return (LazyPVectorX>)super.zipWithIndex(); + + return (LazyPVectorX>) super.zipWithIndex(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#distinct() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#distinct() */ @Override public LazyPVectorX distinct() { - - return (LazyPVectorX)super.distinct(); + + return (LazyPVectorX) super.distinct(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted() */ @Override public LazyPVectorX sorted() { - - return (LazyPVectorX)super.sorted(); + + return (LazyPVectorX) super.sorted(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#sorted(java.util.Comparator) */ @Override public LazyPVectorX sorted(Comparator c) { - - return (LazyPVectorX)super.sorted(c); + + return (LazyPVectorX) super.sorted(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipWhile(java.util.function.Predicate) */ @Override public LazyPVectorX skipWhile(Predicate p) { - - return (LazyPVectorX)super.skipWhile(p); + + return (LazyPVectorX) super.skipWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipUntil(java.util.function.Predicate) */ @Override public LazyPVectorX skipUntil(Predicate p) { - - return (LazyPVectorX)super.skipUntil(p); + + return (LazyPVectorX) super.skipUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitWhile(java.util.function.Predicate) */ @Override public LazyPVectorX limitWhile(Predicate p) { - - return (LazyPVectorX)super.limitWhile(p); + + return (LazyPVectorX) super.limitWhile(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitUntil(java.util.function.Predicate) */ @Override public LazyPVectorX limitUntil(Predicate p) { - - return (LazyPVectorX)super.limitUntil(p); + + return (LazyPVectorX) super.limitUntil(p); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#intersperse(java.lang.Object) */ @Override public LazyPVectorX intersperse(T value) { - - return (LazyPVectorX)super.intersperse(value); + + return (LazyPVectorX) super.intersperse(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle() */ @Override public LazyPVectorX shuffle() { - - return (LazyPVectorX)super.shuffle(); + + return (LazyPVectorX) super.shuffle(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#skipLast(int) */ @Override public LazyPVectorX skipLast(int num) { - - return (LazyPVectorX)super.skipLast(num); + + return (LazyPVectorX) super.skipLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#limitLast(int) */ @Override public LazyPVectorX limitLast(int num) { - - return (LazyPVectorX)super.limitLast(num); + + return (LazyPVectorX) super.limitLast(num); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmpty(java.lang.Object) */ @Override public LazyPVectorX onEmpty(T value) { - - return (LazyPVectorX)super.onEmpty(value); + + return (LazyPVectorX) super.onEmpty(value); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyGet(java.util.function.Supplier) */ @Override public LazyPVectorX onEmptyGet(Supplier supplier) { - - return (LazyPVectorX)super.onEmptyGet(supplier); + + return (LazyPVectorX) super.onEmptyGet(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#onEmptyThrow(java.util.function.Supplier) */ @Override public LazyPVectorX onEmptyThrow(Supplier supplier) { - - return (LazyPVectorX)super.onEmptyThrow(supplier); + + return (LazyPVectorX) super.onEmptyThrow(supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#shuffle(java.util.Random) */ @Override public LazyPVectorX shuffle(Random random) { - - return (LazyPVectorX)super.shuffle(random); + + return (LazyPVectorX) super.shuffle(random); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#ofType(java.lang.Class) */ @Override public LazyPVectorX ofType(Class type) { - - return (LazyPVectorX)super.ofType(type); + + return (LazyPVectorX) super.ofType(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#filterNot(java.util.function.Predicate) */ @Override public LazyPVectorX filterNot(Predicate fn) { - - return (LazyPVectorX)super.filterNot(fn); + + return (LazyPVectorX) super.filterNot(fn); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#notNull() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#notNull() */ @Override public LazyPVectorX notNull() { - - return (LazyPVectorX)super.notNull(); + + return (LazyPVectorX) super.notNull(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.util.stream.Stream) */ @Override public LazyPVectorX removeAll(Stream stream) { - - return (LazyPVectorX)(super.removeAll(stream)); + + return (LazyPVectorX) (super.removeAll(stream)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(org.jooq.lambda.Seq) */ @Override public LazyPVectorX removeAll(Seq stream) { - - return (LazyPVectorX)super.removeAll(stream); + + return (LazyPVectorX) super.removeAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Iterable) */ @Override public LazyPVectorX removeAll(Iterable it) { - - return (LazyPVectorX)super.removeAll(it); + + return (LazyPVectorX) super.removeAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#removeAll(java.lang.Object[]) */ @Override public LazyPVectorX removeAll(T... values) { - - return (LazyPVectorX)super.removeAll(values); + + return (LazyPVectorX) super.removeAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Iterable) */ @Override public LazyPVectorX retainAll(Iterable it) { - - return (LazyPVectorX)super.retainAll(it); + + return (LazyPVectorX) super.retainAll(it); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.util.stream.Stream) */ @Override public LazyPVectorX retainAll(Stream stream) { - - return (LazyPVectorX)super.retainAll(stream); + + return (LazyPVectorX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(org.jooq.lambda.Seq) */ @Override public LazyPVectorX retainAll(Seq stream) { - - return (LazyPVectorX)super.retainAll(stream); + + return (LazyPVectorX) super.retainAll(stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#retainAll(java.lang.Object[]) */ @Override public LazyPVectorX retainAll(T... values) { - - return (LazyPVectorX)super.retainAll(values); + + return (LazyPVectorX) super.retainAll(values); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#cast(java.lang.Class) */ @Override public LazyPVectorX cast(Class type) { - - return (LazyPVectorX)super.cast(type); + + return (LazyPVectorX) super.cast(type); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#patternMatch(java.util.function.Function, + * java.util.function.Supplier) */ @Override public LazyPVectorX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyPVectorX)super.patternMatch(case1, otherwise); + + return (LazyPVectorX) super.patternMatch(case1, otherwise); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#permutations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#permutations() */ @Override public LazyPVectorX> permutations() { - - return (LazyPVectorX>)super.permutations(); + + return (LazyPVectorX>) super.permutations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations(int) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations(int) */ @Override public LazyPVectorX> combinations(int size) { - - return (LazyPVectorX>)super.combinations(size); + + return (LazyPVectorX>) super.combinations(size); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations() */ @Override public LazyPVectorX> combinations() { - - return (LazyPVectorX>)super.combinations(); + + return (LazyPVectorX>) super.combinations(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(int, java.util.function.Supplier) */ @Override public > LazyPVectorX grouped(int size, Supplier supplier) { - - return (LazyPVectorX)super.grouped(size, supplier); + + return (LazyPVectorX) super.grouped(size, supplier); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate) */ @Override public LazyPVectorX> groupedUntil(Predicate predicate) { - - return (LazyPVectorX>)super.groupedUntil(predicate); + + return (LazyPVectorX>) super.groupedUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate) */ @Override public LazyPVectorX> groupedWhile(Predicate predicate) { - - return (LazyPVectorX>)super.groupedWhile(predicate); + + return (LazyPVectorX>) super.groupedWhile(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedWhile(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPVectorX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyPVectorX)super.groupedWhile(predicate, factory); + + return (LazyPVectorX) super.groupedWhile(predicate, factory); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedUntil(java.util.function.Predicate, + * java.util.function.Supplier) */ @Override public > LazyPVectorX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyPVectorX)super.groupedUntil(predicate, factory); + + return (LazyPVectorX) super.groupedUntil(predicate, factory); } - + /** PStackX methods **/ - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#with(int, + * java.lang.Object) */ - public LazyPVectorX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyPVectorX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyPVectorX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyPVectorX>)super.groupedStatefullyUntil(predicate); + + return (LazyPVectorX>) super.groupedStatefullyUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyPVectorX peek(Consumer c) { - - return (LazyPVectorX)super.peek(c); + + return (LazyPVectorX) super.peek(c); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazyPVectorX zip(Seq other, - BiFunction zipper) { - - return (LazyPVectorX)super.zip(other, zipper); + public LazyPVectorX zip(Seq other, BiFunction zipper) { + + return (LazyPVectorX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazyPVectorX zip(Stream other, - BiFunction zipper) { - - return (LazyPVectorX)super.zip(other, zipper); + public LazyPVectorX zip(Stream other, BiFunction zipper) { + + return (LazyPVectorX) super.zip(other, zipper); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyPVectorX> zip(Stream other) { - - return (LazyPVectorX)super.zip(other); + + return (LazyPVectorX) super.zip(other); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyPVectorX zip(BiFunction fn, Publisher publisher) { - - return (LazyPVectorX)super.zip(fn, publisher); + + return (LazyPVectorX) super.zip(fn, publisher); } - - - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazyPVectorX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); - + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); + } - - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit(Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#unit( + * Collection) */ @Override public LazyPVectorX unit(Collection col) { - + return fromIterable(col); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Unit#unit(java.lang.Object) */ @Override @@ -1362,43 +1701,58 @@ public LazyPVectorX unit(R value) { return singleton(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#unitIterator(java.util.Iterator) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#unitIterator(java.util.Iterator) */ @Override - public LazyPVectorX unitIterator(Iterator it) { + public LazyPVectorX unitIterator(Iterator it) { return fromIterable(() -> it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PVectorX#emptyUnit() + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PVectorX#emptyUnit + * () */ @Override public LazyPVectorX emptyUnit() { - + return LazyPVectorX. empty(); } - - /* + /* * This converted to PVector * * (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PVectorX#toPVector() + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PVectorX#toPVector + * () */ public LazyPVectorX toPVector() { return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazyPVectorX plusInOrder(T e) { return plus(size(), e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.CollectionX#stream() */ @Override @@ -1406,68 +1760,99 @@ public ReactiveSeq stream() { return ReactiveSeq.fromIterable(this); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazyPVectorX from(Collection col) { return fromIterable(col); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PVectorX#monoid() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PVectorX#monoid() */ @Override public Reducer> monoid() { - + return Reducers.toPVector(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plus(java.lang.Object) */ public LazyPVectorX plus(T e) { - return new LazyPVectorX(getVector().plus(e),this.collector); + return new LazyPVectorX( + getVector().plus(e), this.collector); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.PStack#plus(int, java.lang.Object) */ public LazyPVectorX plus(int i, T e) { - return new LazyPVectorX(getVector().plus(i,e),this.collector); + return new LazyPVectorX( + getVector().plus(i, e), this.collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#minus(java.lang.Object) */ - public LazyPVectorX minus(Object e) { - return new LazyPVectorX(getVector().minus(e),this.collector); + public LazyPVectorX minus(Object e) { + return new LazyPVectorX( + getVector().minus(e), this.collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#plusAll(java.util.Collection) */ - public LazyPVectorX plusAll(Collection list) { - return new LazyPVectorX(getVector().plusAll(list),this.collector); + public LazyPVectorX plusAll(Collection list) { + return new LazyPVectorX( + getVector().plusAll(list), this.collector); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.PStack#plusAll(int, java.util.Collection) */ public LazyPVectorX plusAll(int i, Collection list) { - return new LazyPVectorX(getVector().plusAll(i,list),this.collector); + return new LazyPVectorX( + getVector().plusAll(i, list), this.collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.pcollections.MapPSet#minusAll(java.util.Collection) */ public LazyPVectorX minusAll(Collection list) { - return new LazyPVectorX(getVector().minusAll(list),this.collector); + return new LazyPVectorX( + getVector().minusAll(list), this.collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see org.pcollections.PStack#minus(int) */ public LazyPVectorX minus(int i) { - return new LazyPVectorX(getVector().minus(i),this.collector); + return new LazyPVectorX( + getVector().minus(i), this.collector); } - } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyDequeX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyDequeX.java index 7fc54d6f..e2929989 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyDequeX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyDequeX.java @@ -39,6 +39,7 @@ import lombok.Getter; import reactor.core.publisher.Flux; + /** * An extended Deque type {@see java.util.Deque} * Extended Deque operations execute lazily e.g. @@ -65,20 +66,22 @@ * * @param the type of elements held in this collection */ -public class LazyDequeX extends AbstractFluentCollectionX implements DequeX { - private final LazyFluentCollection> lazy; +public class LazyDequeX extends AbstractFluentCollectionXimplements DequeX { + private final LazyFluentCollection> lazy; @Getter - private final Collector> collector; - + private final Collector> collector; + /** * Create a LazyDequeX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyDequeX */ - public static LazyDequeX fromStreamS(Stream stream){ - return new LazyDequeX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyDequeX fromStreamS(Stream stream) { + return new LazyDequeX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyListX that contains the Integers between start and end * @@ -134,7 +137,7 @@ static LazyDequeX unfold(U seed, Function LazyDequeX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -147,10 +150,9 @@ public static LazyDequeX generate(long limit, Supplier s) { */ public static LazyDequeX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyListX */ @@ -158,14 +160,13 @@ public static LazyDequeX iterate(long limit, final T seed, final UnaryOpe return Collectors.toCollection(() -> LazyDequeX.of()); } - - /** * @return An empty LazyListX */ public static LazyDequeX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -186,8 +187,9 @@ public static LazyDequeX empty() { */ @SafeVarargs public static LazyDequeX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -228,7 +230,7 @@ public static LazyDequeX fromPublisher(Publisher publisher) * @return LazyListX from Iterable */ public static LazyDequeX fromIterable(Iterable it) { - return fromIterable(DequeX.defaultCollector(), it); + return fromIterable(DequeX. defaultCollector(), it); } /** @@ -241,40 +243,52 @@ public static LazyDequeX fromIterable(Iterable it) { public static LazyDequeX fromIterable(Collector> collector, Iterable it) { if (it instanceof LazyDequeX) return (LazyDequeX) it; - + if (it instanceof Deque) return new LazyDequeX( - (Deque) it, collector); + (Deque) it, collector); return new LazyDequeX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazyDequeX(Deque list,Collector> collector){ - this.lazy = new LazyCollection<>(list,null,collector); - this.collector= collector; + + private LazyDequeX(Deque list, Collector> collector) { + this.lazy = new LazyCollection<>( + list, null, collector); + this.collector = collector; } - - private LazyDequeX(Deque list){ - + + private LazyDequeX(Deque list) { + this.collector = DequeX.defaultCollector(); - this.lazy = new LazyCollection>(list,null,collector); + this.lazy = new LazyCollection>( + list, null, collector); } - private LazyDequeX(Flux stream,Collector> collector){ - + + private LazyDequeX(Flux stream, Collector> collector) { + this.collector = collector; - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazyDequeX(Flux stream){ - + + private LazyDequeX(Flux stream) { + this.collector = DequeX.defaultCollector(); - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazyDequeX(){ + + private LazyDequeX() { this.collector = DequeX.defaultCollector(); - this.lazy = new LazyCollection<>((Deque)this.collector.supplier().get(),null,collector); + this.lazy = new LazyCollection<>( + (Deque) this.collector.supplier() + .get(), + null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -282,7 +296,9 @@ public void forEach(Consumer action) { getDeque().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -290,7 +306,9 @@ public Iterator iterator() { return getDeque().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -298,7 +316,9 @@ public int size() { return getDeque().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -306,7 +326,9 @@ public boolean contains(Object e) { return getDeque().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -314,9 +336,9 @@ public boolean equals(Object o) { return getDeque().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -324,7 +346,9 @@ public boolean isEmpty() { return getDeque().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -332,7 +356,9 @@ public int hashCode() { return getDeque().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -340,7 +366,9 @@ public Object[] toArray() { return getDeque().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -348,7 +376,9 @@ public boolean removeAll(Collection c) { return getDeque().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -356,7 +386,9 @@ public T[] toArray(T[] a) { return getDeque().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -364,7 +396,9 @@ public boolean add(T e) { return getDeque().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -372,7 +406,9 @@ public boolean remove(Object o) { return getDeque().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -380,7 +416,9 @@ public boolean containsAll(Collection c) { return getDeque().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -388,7 +426,9 @@ public boolean addAll(Collection c) { return getDeque().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -396,7 +436,9 @@ public boolean retainAll(Collection c) { return getDeque().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -404,8 +446,9 @@ public void clear() { getDeque().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -413,7 +456,9 @@ public String toString() { return getDeque().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -421,817 +466,1258 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getDeque().removeIf(filter); } - - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getDeque().parallelStream(); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getDeque().spliterator(); } - + private Deque getDeque() { return lazy.get(); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyDequeX stream(Flux stream){ - return new LazyDequeX(stream); + public LazyDequeX stream(Flux stream) { + return new LazyDequeX( + stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() */ @Override public ReactiveSeq stream() { - return ReactiveSeq.fromStream(lazy.get().stream()); + return ReactiveSeq.fromStream(lazy.get() + .stream()); } + @Override public Flux flux() { return lazy.flux(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#combine(java. + * util.function.BiPredicate, java.util.function.BinaryOperator) */ @Override public LazyDequeX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyDequeX)super.combine(predicate, op); + + return (LazyDequeX) super.combine(predicate, op); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.ListX#reverse() */ @Override public LazyDequeX reverse() { - - return(LazyDequeX)super.reverse(); + + return (LazyDequeX) super.reverse(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#filter(java. + * util.function.Predicate) */ @Override public LazyDequeX filter(Predicate pred) { - - return (LazyDequeX)super.filter(pred); + + return (LazyDequeX) super.filter(pred); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#map(java.util. + * function.Function) */ @Override public LazyDequeX map(Function mapper) { - - return (LazyDequeX)super.map(mapper); + + return (LazyDequeX) super.map(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#flatMap(java. + * util.function.Function) */ @Override public LazyDequeX flatMap(Function> mapper) { - return (LazyDequeX)super.flatMap(mapper); + return (LazyDequeX) super.flatMap(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#limit(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#limit(long) */ @Override public LazyDequeX limit(long num) { - return (LazyDequeX)super.limit(num); + return (LazyDequeX) super.limit(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#skip(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#skip(long) */ @Override public LazyDequeX skip(long num) { - return (LazyDequeX)super.skip(num); + return (LazyDequeX) super.skip(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#takeRight(int) */ @Override public LazyDequeX takeRight(int num) { - return (LazyDequeX)super.takeRight(num); + return (LazyDequeX) super.takeRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#dropRight(int) */ @Override public LazyDequeX dropRight(int num) { - return (LazyDequeX)super.dropRight(num); + return (LazyDequeX) super.dropRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#takeWhile(java + * .util.function.Predicate) */ @Override public LazyDequeX takeWhile(Predicate p) { - return (LazyDequeX)super.takeWhile(p); + return (LazyDequeX) super.takeWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#dropWhile(java + * .util.function.Predicate) */ @Override public LazyDequeX dropWhile(Predicate p) { - return (LazyDequeX)super.dropWhile(p); + return (LazyDequeX) super.dropWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#takeUntil(java + * .util.function.Predicate) */ @Override public LazyDequeX takeUntil(Predicate p) { - return (LazyDequeX)super.takeUntil(p); + return (LazyDequeX) super.takeUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#dropUntil(java + * .util.function.Predicate) */ @Override public LazyDequeX dropUntil(Predicate p) { - return(LazyDequeX)super.dropUntil(p); + return (LazyDequeX) super.dropUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#trampoline( + * java.util.function.Function) */ @Override public LazyDequeX trampoline(Function> mapper) { - return (LazyDequeX)super.trampoline(mapper); + return (LazyDequeX) super.trampoline(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#slice(long, + * long) */ @Override public LazyDequeX slice(long from, long to) { - return (LazyDequeX)super.slice(from, to); + return (LazyDequeX) super.slice(from, to); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(int) */ @Override public LazyDequeX> grouped(int groupSize) { - - return (LazyDequeX>)super.grouped(groupSize); + + return (LazyDequeX>) super.grouped(groupSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(java. + * util.function.Function, java.util.stream.Collector) */ @Override public LazyDequeX> grouped(Function classifier, Collector downstream) { - - return (LazyDequeX)super.grouped(classifier, downstream); + + return (LazyDequeX) super.grouped(classifier, downstream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(java. + * util.function.Function) */ @Override public LazyDequeX>> grouped(Function classifier) { - - return (LazyDequeX)super.grouped(classifier); + + return (LazyDequeX) super.grouped(classifier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip(java.lang. + * Iterable) */ @Override public LazyDequeX> zip(Iterable other) { - - return (LazyDequeX)super.zip(other); + + return (LazyDequeX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip(java.lang. + * Iterable, java.util.function.BiFunction) */ @Override public LazyDequeX zip(Iterable other, BiFunction zipper) { - - return (LazyDequeX)super.zip(other, zipper); + + return (LazyDequeX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sliding(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#sliding(int) */ @Override public LazyDequeX> sliding(int windowSize) { - - return (LazyDequeX>)super.sliding(windowSize); + + return (LazyDequeX>) super.sliding(windowSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#sliding(int, + * int) */ @Override public LazyDequeX> sliding(int windowSize, int increment) { - - return (LazyDequeX>)super.sliding(windowSize, increment); + + return (LazyDequeX>) super.sliding(windowSize, increment); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#scanLeft(com. + * aol.cyclops.Monoid) */ @Override public LazyDequeX scanLeft(Monoid monoid) { - - return (LazyDequeX)super.scanLeft(monoid); + + return (LazyDequeX) super.scanLeft(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#scanLeft(java. + * lang.Object, java.util.function.BiFunction) */ @Override public LazyDequeX scanLeft(U seed, BiFunction function) { - + return (LazyDequeX) super.scanLeft(seed, function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#scanRight(com. + * aol.cyclops.Monoid) */ @Override public LazyDequeX scanRight(Monoid monoid) { - - return (LazyDequeX)super.scanRight(monoid); + + return (LazyDequeX) super.scanRight(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#scanRight(java + * .lang.Object, java.util.function.BiFunction) */ @Override public LazyDequeX scanRight(U identity, BiFunction combiner) { - - return (LazyDequeX)super.scanRight(identity, combiner); + + return (LazyDequeX) super.scanRight(identity, combiner); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#sorted(java. + * util.function.Function) */ @Override public > LazyDequeX sorted(Function function) { - - return (LazyDequeX)super.sorted(function); + + return (LazyDequeX) super.sorted(function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plus(java.lang + * .Object) */ @Override public LazyDequeX plus(T e) { - - return (LazyDequeX)super.plus(e); + + return (LazyDequeX) super.plus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plusAll(java. + * util.Collection) */ @Override public LazyDequeX plusAll(Collection list) { - - return (LazyDequeX)super.plusAll(list); + + return (LazyDequeX) super.plusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minus(java. + * lang.Object) */ @Override public LazyDequeX minus(Object e) { - - return (LazyDequeX)super.minus(e); + + return (LazyDequeX) super.minus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minusAll(java. + * util.Collection) */ @Override public LazyDequeX minusAll(Collection list) { - - return (LazyDequeX)super.minusAll(list); + + return (LazyDequeX) super.minusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plusLazy(java. + * lang.Object) */ @Override public LazyDequeX plusLazy(T e) { - - return (LazyDequeX)super.plusLazy(e); + + return (LazyDequeX) super.plusLazy(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plusAllLazy( + * java.util.Collection) */ @Override public LazyDequeX plusAllLazy(Collection list) { - - return (LazyDequeX)super.plusAllLazy(list); + + return (LazyDequeX) super.plusAllLazy(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minusLazy(java + * .lang.Object) */ @Override public LazyDequeX minusLazy(Object e) { - - return (LazyDequeX)super.minusLazy(e); + + return (LazyDequeX) super.minusLazy(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minusAllLazy( + * java.util.Collection) */ @Override public LazyDequeX minusAllLazy(Collection list) { - - return (LazyDequeX)super.minusAllLazy(list); + + return (LazyDequeX) super.minusAllLazy(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cycle(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cycle(int) */ @Override public LazyDequeX cycle(int times) { - - return (LazyDequeX)super.cycle(times); + + return (LazyDequeX) super.cycle(times); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cycle(com.aol. + * cyclops.Monoid, int) */ @Override public LazyDequeX cycle(Monoid m, int times) { - - return (LazyDequeX)super.cycle(m, times); + + return (LazyDequeX) super.cycle(m, times); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cycleWhile( + * java.util.function.Predicate) */ @Override public LazyDequeX cycleWhile(Predicate predicate) { - - return (LazyDequeX)super.cycleWhile(predicate); + + return (LazyDequeX) super.cycleWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cycleUntil( + * java.util.function.Predicate) */ @Override public LazyDequeX cycleUntil(Predicate predicate) { - - return (LazyDequeX)super.cycleUntil(predicate); + + return (LazyDequeX) super.cycleUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip(org.jooq. + * lambda.Seq) */ @Override public LazyDequeX> zip(Seq other) { - - return (LazyDequeX)super.zip(other); + + return (LazyDequeX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip3(java.util + * .stream.Stream, java.util.stream.Stream) */ @Override public LazyDequeX> zip3(Stream second, Stream third) { - - return (LazyDequeX)super.zip3(second, third); + + return (LazyDequeX) super.zip3(second, third); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip4(java.util + * .stream.Stream, java.util.stream.Stream, java.util.stream.Stream) */ @Override public LazyDequeX> zip4(Stream second, Stream third, Stream fourth) { - - return (LazyDequeX)super.zip4(second, third, fourth); + + return (LazyDequeX) super.zip4(second, third, fourth); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zipWithIndex() */ @Override public LazyDequeX> zipWithIndex() { - - return (LazyDequeX>)super.zipWithIndex(); + + return (LazyDequeX>) super.zipWithIndex(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#distinct() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#distinct() */ @Override public LazyDequeX distinct() { - - return (LazyDequeX)super.distinct(); + + return (LazyDequeX) super.distinct(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sorted() */ @Override public LazyDequeX sorted() { - - return (LazyDequeX)super.sorted(); + + return (LazyDequeX) super.sorted(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#sorted(java. + * util.Comparator) */ @Override public LazyDequeX sorted(Comparator c) { - - return (LazyDequeX)super.sorted(c); + + return (LazyDequeX) super.sorted(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#skipWhile(java + * .util.function.Predicate) */ @Override public LazyDequeX skipWhile(Predicate p) { - - return (LazyDequeX)super.skipWhile(p); + + return (LazyDequeX) super.skipWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#skipUntil(java + * .util.function.Predicate) */ @Override public LazyDequeX skipUntil(Predicate p) { - - return (LazyDequeX)super.skipUntil(p); + + return (LazyDequeX) super.skipUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#limitWhile( + * java.util.function.Predicate) */ @Override public LazyDequeX limitWhile(Predicate p) { - - return (LazyDequeX)super.limitWhile(p); + + return (LazyDequeX) super.limitWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#limitUntil( + * java.util.function.Predicate) */ @Override public LazyDequeX limitUntil(Predicate p) { - - return (LazyDequeX)super.limitUntil(p); + + return (LazyDequeX) super.limitUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#intersperse( + * java.lang.Object) */ @Override public LazyDequeX intersperse(T value) { - - return (LazyDequeX)super.intersperse(value); + + return (LazyDequeX) super.intersperse(value); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.ListX#shuffle() */ @Override public LazyDequeX shuffle() { - - return (LazyDequeX)super.shuffle(); + + return (LazyDequeX) super.shuffle(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#skipLast(int) */ @Override public LazyDequeX skipLast(int num) { - - return (LazyDequeX)super.skipLast(num); + + return (LazyDequeX) super.skipLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#limitLast(int) */ @Override public LazyDequeX limitLast(int num) { - - return (LazyDequeX)super.limitLast(num); + + return (LazyDequeX) super.limitLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmpty(java. + * lang.Object) */ @Override public LazyDequeX onEmpty(T value) { - - return (LazyDequeX)super.onEmpty(value); + + return (LazyDequeX) super.onEmpty(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptyGet( + * java.util.function.Supplier) */ @Override public LazyDequeX onEmptyGet(Supplier supplier) { - - return (LazyDequeX)super.onEmptyGet(supplier); + + return (LazyDequeX) super.onEmptyGet(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptyThrow( + * java.util.function.Supplier) */ @Override public LazyDequeX onEmptyThrow(Supplier supplier) { - - return (LazyDequeX)super.onEmptyThrow(supplier); + + return (LazyDequeX) super.onEmptyThrow(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#shuffle(java. + * util.Random) */ @Override public LazyDequeX shuffle(Random random) { - - return (LazyDequeX)super.shuffle(random); + + return (LazyDequeX) super.shuffle(random); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#ofType(java. + * lang.Class) */ @Override public LazyDequeX ofType(Class type) { - - return (LazyDequeX)super.ofType(type); + + return (LazyDequeX) super.ofType(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#filterNot(java + * .util.function.Predicate) */ @Override public LazyDequeX filterNot(Predicate fn) { - - return (LazyDequeX)super.filterNot(fn); + + return (LazyDequeX) super.filterNot(fn); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.ListX#notNull() */ @Override public LazyDequeX notNull() { - - return (LazyDequeX)super.notNull(); + + return (LazyDequeX) super.notNull(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java + * .util.stream.Stream) */ @Override public LazyDequeX removeAll(Stream stream) { - - return (LazyDequeX)(super.removeAll(stream)); + + return (LazyDequeX) (super.removeAll(stream)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(org. + * jooq.lambda.Seq) */ @Override public LazyDequeX removeAll(Seq stream) { - - return (LazyDequeX)super.removeAll(stream); + + return (LazyDequeX) super.removeAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java + * .lang.Iterable) */ @Override public LazyDequeX removeAll(Iterable it) { - - return (LazyDequeX)super.removeAll(it); + + return (LazyDequeX) super.removeAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java + * .lang.Object[]) */ @Override public LazyDequeX removeAll(T... values) { - - return (LazyDequeX)super.removeAll(values); + + return (LazyDequeX) super.removeAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java + * .lang.Iterable) */ @Override public LazyDequeX retainAll(Iterable it) { - - return (LazyDequeX)super.retainAll(it); + + return (LazyDequeX) super.retainAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java + * .util.stream.Stream) */ @Override public LazyDequeX retainAll(Stream stream) { - - return (LazyDequeX)super.retainAll(stream); + + return (LazyDequeX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(org. + * jooq.lambda.Seq) */ @Override public LazyDequeX retainAll(Seq stream) { - - return (LazyDequeX)super.retainAll(stream); + + return (LazyDequeX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java + * .lang.Object[]) */ @Override public LazyDequeX retainAll(T... values) { - - return (LazyDequeX)super.retainAll(values); + + return (LazyDequeX) super.retainAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cast(java.lang + * .Class) */ @Override public LazyDequeX cast(Class type) { - - return (LazyDequeX)super.cast(type); + + return (LazyDequeX) super.cast(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#patternMatch( + * java.util.function.Function, java.util.function.Supplier) */ @Override public LazyDequeX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyDequeX)super.patternMatch(case1, otherwise); + + return (LazyDequeX) super.patternMatch(case1, otherwise); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#permutations() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#permutations() */ @Override public LazyDequeX> permutations() { - - return (LazyDequeX>)super.permutations(); + + return (LazyDequeX>) super.permutations(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#combinations(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#combinations( + * int) */ @Override public LazyDequeX> combinations(int size) { - - return (LazyDequeX>)super.combinations(size); + + return (LazyDequeX>) super.combinations(size); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#combinations() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#combinations() */ @Override public LazyDequeX> combinations() { - - return (LazyDequeX>)super.combinations(); + + return (LazyDequeX>) super.combinations(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(int, + * java.util.function.Supplier) */ @Override public > LazyDequeX grouped(int size, Supplier supplier) { - - return (LazyDequeX)super.grouped(size, supplier); + + return (LazyDequeX) super.grouped(size, supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#groupedUntil( + * java.util.function.Predicate) */ @Override public LazyDequeX> groupedUntil(Predicate predicate) { - - return (LazyDequeX>)super.groupedUntil(predicate); + + return (LazyDequeX>) super.groupedUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#groupedWhile( + * java.util.function.Predicate) */ @Override public LazyDequeX> groupedWhile(Predicate predicate) { - - return (LazyDequeX>)super.groupedWhile(predicate); + + return (LazyDequeX>) super.groupedWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#groupedWhile( + * java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazyDequeX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyDequeX)super.groupedWhile(predicate, factory); + + return (LazyDequeX) super.groupedWhile(predicate, factory); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#groupedUntil( + * java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazyDequeX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyDequeX)super.groupedUntil(predicate, factory); + + return (LazyDequeX) super.groupedUntil(predicate, factory); } - + /** ListX methods **/ - /* Makes a defensive copy of this ListX replacing the value at i with the specified element - * (non-Javadoc) - * @see com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with(int, java.lang.Object) + /* + * Makes a defensive copy of this ListX replacing the value at i with the + * specified element (non-Javadoc) + * + * @see + * com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with( + * int, java.lang.Object) */ - public LazyDequeX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyDequeX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#unit(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #unit(java.util.Collection) */ @Override - public LazyDequeX unit(Collection col){ + public LazyDequeX unit(Collection col) { return LazyDequeX.fromIterable(col); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Unit#unit(java.lang.Object) */ @Override - public LazyDequeX unit(R value){ + public LazyDequeX unit(R value) { return LazyDequeX.singleton(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#unitIterator(java.util.Iterator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#unitIterator(java.util.Iterator) */ @Override - public LazyDequeX unitIterator(Iterator it){ - return LazyDequeX.fromIterable(()->it); + public LazyDequeX unitIterator(Iterator it) { + return LazyDequeX.fromIterable(() -> it); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazyDequeX plusInOrder(T e) { - - return (LazyDequeX)super.plusInOrder(e); + + return (LazyDequeX) super.plusInOrder(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazyDequeX from(Collection c) { - if(c instanceof List) - return new LazyDequeX((Deque)c,(Collector)collector); - return new LazyDequeX((Deque)c.stream().collect(DequeX.defaultCollector()),(Collector)this.collector); + if (c instanceof List) + return new LazyDequeX( + (Deque) c, (Collector) collector); + return new LazyDequeX( + (Deque) c.stream() + .collect(DequeX.defaultCollector()), + (Collector) this.collector); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyDequeX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyDequeX>)super.groupedStatefullyUntil(predicate); + + return (LazyDequeX>) super.groupedStatefullyUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyDequeX peek(Consumer c) { - - return (LazyDequeX)super.peek(c); + + return (LazyDequeX) super.peek(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazyDequeX zip(Seq other, - BiFunction zipper) { - - return (LazyDequeX)super.zip(other, zipper); + public LazyDequeX zip(Seq other, BiFunction zipper) { + + return (LazyDequeX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazyDequeX zip(Stream other, - BiFunction zipper) { - - return (LazyDequeX)super.zip(other, zipper); + public LazyDequeX zip(Stream other, BiFunction zipper) { + + return (LazyDequeX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyDequeX> zip(Stream other) { - - return (LazyDequeX)super.zip(other); + + return (LazyDequeX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyDequeX zip(BiFunction fn, Publisher publisher) { - - return (LazyDequeX)super.zip(fn, publisher); + + return (LazyDequeX) super.zip(fn, publisher); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.DequeX#fromStream(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.DequeX#fromStream( + * java.util.stream.Stream) */ @Override public LazyDequeX fromStream(Stream stream) { - Deque list = (Deque) stream.collect((Collector)getCollector()); - return new LazyDequeX(list, (Collector)getCollector()); + Deque list = (Deque) stream.collect((Collector) getCollector()); + return new LazyDequeX( + list, (Collector) getCollector()); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazyDequeX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); } - /** * @param e @@ -1240,6 +1726,7 @@ public LazyDequeX onEmptySwitch(Supplier> supplier) { public void addFirst(T e) { getDeque().addFirst(e); } + /** * @param e * @see java.util.Deque#addLast(java.lang.Object) @@ -1247,6 +1734,7 @@ public void addFirst(T e) { public void addLast(T e) { getDeque().addLast(e); } + /** * @param e * @return @@ -1255,6 +1743,7 @@ public void addLast(T e) { public boolean offerFirst(T e) { return getDeque().offerFirst(e); } + /** * @param e * @return @@ -1263,6 +1752,7 @@ public boolean offerFirst(T e) { public boolean offerLast(T e) { return getDeque().offerLast(e); } + /** * @return * @see java.util.Deque#removeFirst() @@ -1270,6 +1760,7 @@ public boolean offerLast(T e) { public T removeFirst() { return getDeque().removeFirst(); } + /** * @return * @see java.util.Deque#removeLast() @@ -1277,6 +1768,7 @@ public T removeFirst() { public T removeLast() { return getDeque().removeLast(); } + /** * @return * @see java.util.Deque#pollFirst() @@ -1284,6 +1776,7 @@ public T removeLast() { public T pollFirst() { return getDeque().pollFirst(); } + /** * @return * @see java.util.Deque#pollLast() @@ -1291,6 +1784,7 @@ public T pollFirst() { public T pollLast() { return getDeque().pollLast(); } + /** * @return * @see java.util.Deque#getFirst() @@ -1298,6 +1792,7 @@ public T pollLast() { public T getFirst() { return getDeque().getFirst(); } + /** * @return * @see java.util.Deque#getLast() @@ -1305,6 +1800,7 @@ public T getFirst() { public T getLast() { return getDeque().getLast(); } + /** * @return * @see java.util.Deque#peekFirst() @@ -1312,6 +1808,7 @@ public T getLast() { public T peekFirst() { return getDeque().peekFirst(); } + /** * @return * @see java.util.Deque#peekLast() @@ -1319,6 +1816,7 @@ public T peekFirst() { public T peekLast() { return getDeque().peekLast(); } + /** * @param o * @return @@ -1327,6 +1825,7 @@ public T peekLast() { public boolean removeFirstOccurrence(Object o) { return getDeque().removeFirstOccurrence(o); } + /** * @param o * @return @@ -1335,6 +1834,7 @@ public boolean removeFirstOccurrence(Object o) { public boolean removeLastOccurrence(Object o) { return getDeque().removeLastOccurrence(o); } + /** * @param e * @return @@ -1343,6 +1843,7 @@ public boolean removeLastOccurrence(Object o) { public boolean offer(T e) { return getDeque().offer(e); } + /** * @return * @see java.util.Deque#remove() @@ -1350,6 +1851,7 @@ public boolean offer(T e) { public T remove() { return getDeque().remove(); } + /** * @return * @see java.util.Deque#poll() @@ -1357,6 +1859,7 @@ public T remove() { public T poll() { return getDeque().poll(); } + /** * @return * @see java.util.Deque#element() @@ -1364,6 +1867,7 @@ public T poll() { public T element() { return getDeque().element(); } + /** * @return * @see java.util.Deque#peek() @@ -1371,6 +1875,7 @@ public T element() { public T peek() { return getDeque().peek(); } + /** * @param e * @see java.util.Deque#push(java.lang.Object) @@ -1378,6 +1883,7 @@ public T peek() { public void push(T e) { getDeque().push(e); } + /** * @return * @see java.util.Deque#pop() @@ -1385,6 +1891,7 @@ public void push(T e) { public T pop() { return getDeque().pop(); } + /** * @return * @see java.util.Deque#descendingIterator() @@ -1392,5 +1899,5 @@ public T pop() { public Iterator descendingIterator() { return getDeque().descendingIterator(); } - + } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyListX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyListX.java index 16f0a62b..52b9bd2d 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyListX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyListX.java @@ -40,6 +40,7 @@ import lombok.Getter; import reactor.core.publisher.Flux; + /** * An extended List type {@see java.util.List} * Extended List operations execute lazily e.g. @@ -66,21 +67,22 @@ * * @param the type of elements held in this collection */ -public class LazyListX extends AbstractFluentCollectionX implements ListX { - private final LazyFluentCollection> lazy; +public class LazyListX extends AbstractFluentCollectionXimplements ListX { + private final LazyFluentCollection> lazy; @Getter - private final Collector> collector; - - + private final Collector> collector; + /** * Create a LazyListX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyListX */ - public static LazyListX fromStreamS(Stream stream){ - return new LazyListX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyListX fromStreamS(Stream stream) { + return new LazyListX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyListX that contains the Integers between start and end * @@ -136,7 +138,7 @@ public static LazyListX unfold(U seed, Function LazyListX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -149,10 +151,9 @@ public static LazyListX generate(long limit, Supplier s) { */ public static LazyListX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyListX */ @@ -160,14 +161,13 @@ public static LazyListX iterate(long limit, final T seed, final UnaryOper return Collectors.toCollection(() -> LazyListX.of()); } - - /** * @return An empty LazyListX */ public static LazyListX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -188,8 +188,9 @@ public static LazyListX empty() { */ @SafeVarargs public static LazyListX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -230,7 +231,7 @@ public static LazyListX fromPublisher(Publisher publisher) { * @return LazyListX from Iterable */ public static LazyListX fromIterable(Iterable it) { - return fromIterable(ListX.defaultCollector(), it); + return fromIterable(ListX. defaultCollector(), it); } /** @@ -243,40 +244,52 @@ public static LazyListX fromIterable(Iterable it) { public static LazyListX fromIterable(Collector> collector, Iterable it) { if (it instanceof LazyListX) return (LazyListX) it; - + if (it instanceof List) return new LazyListX( (List) it, collector); return new LazyListX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazyListX(List list,Collector> collector){ - this.lazy = new LazyCollection<>(list,null,collector); - this.collector= collector; + + private LazyListX(List list, Collector> collector) { + this.lazy = new LazyCollection<>( + list, null, collector); + this.collector = collector; } - - private LazyListX(List list){ - + + private LazyListX(List list) { + this.collector = ListX.defaultCollector(); - this.lazy = new LazyCollection>(list,null,collector); + this.lazy = new LazyCollection>( + list, null, collector); } - private LazyListX(Flux stream,Collector> collector){ - + + private LazyListX(Flux stream, Collector> collector) { + this.collector = collector; - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazyListX(Flux stream){ - + + private LazyListX(Flux stream) { + this.collector = ListX.defaultCollector(); - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazyListX(){ + + private LazyListX() { this.collector = ListX.defaultCollector(); - this.lazy = new LazyCollection<>((List)this.collector.supplier().get(),null,collector); + this.lazy = new LazyCollection<>( + (List) this.collector.supplier() + .get(), + null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -284,7 +297,9 @@ public void forEach(Consumer action) { getList().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -292,7 +307,9 @@ public Iterator iterator() { return getList().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -300,7 +317,9 @@ public int size() { return getList().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -308,7 +327,9 @@ public boolean contains(Object e) { return getList().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -316,9 +337,9 @@ public boolean equals(Object o) { return getList().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -326,7 +347,9 @@ public boolean isEmpty() { return getList().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -334,7 +357,9 @@ public int hashCode() { return getList().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -342,7 +367,9 @@ public Object[] toArray() { return getList().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -350,7 +377,9 @@ public boolean removeAll(Collection c) { return getList().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -358,7 +387,9 @@ public T[] toArray(T[] a) { return getList().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -366,7 +397,9 @@ public boolean add(T e) { return getList().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -374,7 +407,9 @@ public boolean remove(Object o) { return getList().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -382,7 +417,9 @@ public boolean containsAll(Collection c) { return getList().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -390,7 +427,9 @@ public boolean addAll(Collection c) { return getList().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -398,7 +437,9 @@ public boolean retainAll(Collection c) { return getList().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -406,8 +447,9 @@ public void clear() { getList().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -415,7 +457,9 @@ public String toString() { return getList().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -423,958 +467,1452 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#addAll(int, java.util.Collection) */ @Override public boolean addAll(int index, Collection c) { return getList().addAll(index, c); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#replaceAll(java.util.function.UnaryOperator) */ @Override public void replaceAll(UnaryOperator operator) { getList().replaceAll(operator); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getList().removeIf(filter); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#sort(java.util.Comparator) */ @Override - public void sort(Comparator c) { + public void sort(Comparator c) { getList().sort(c); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#get(int) */ @Override public T get(int index) { return getList().get(index); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#set(int, java.lang.Object) */ @Override public T set(int index, T element) { return getList().set(index, element); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#add(int, java.lang.Object) */ @Override public void add(int index, T element) { getList().add(index, element); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#remove(int) */ @Override public T remove(int index) { return getList().remove(index); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getList().parallelStream(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#indexOf(java.lang.Object) */ @Override public int indexOf(Object o) { - // return stream().zipWithIndex().filter(t->Objects.equals(t.v1,o)).findFirst().get().v2.intValue(); + // return + // stream().zipWithIndex().filter(t->Objects.equals(t.v1,o)).findFirst().get().v2.intValue(); return getList().indexOf(o); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#lastIndexOf(java.lang.Object) */ @Override public int lastIndexOf(Object o) { return getList().lastIndexOf(o); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#listIterator() */ @Override public ListIterator listIterator() { return getList().listIterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.List#listIterator(int) */ @Override public ListIterator listIterator(int index) { return getList().listIterator(index); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#subList(int, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#subList(int, + * int) */ @Override public LazyListX subList(int fromIndex, int toIndex) { - return new LazyListX(getList().subList(fromIndex, toIndex),getCollector()); + return new LazyListX( + getList().subList(fromIndex, toIndex), getCollector()); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getList().spliterator(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Comparable#compareTo(java.lang.Object) */ @Override public int compareTo(T o) { - if(o instanceof List){ - List l = (List)o; - if(this.size()==l.size()){ + if (o instanceof List) { + List l = (List) o; + if (this.size() == l.size()) { Iterator i1 = iterator(); Iterator i2 = l.iterator(); - if(i1.hasNext()){ - if(i2.hasNext()){ - int comp = Comparator.naturalOrder().compare((Comparable)i1.next(), (Comparable)i2.next()); - if(comp!=0) + if (i1.hasNext()) { + if (i2.hasNext()) { + int comp = Comparator. naturalOrder() + .compare((Comparable) i1.next(), (Comparable) i2.next()); + if (comp != 0) return comp; } return 1; - } - else{ - if(i2.hasNext()) + } else { + if (i2.hasNext()) return -1; else return 0; } } - return this.size() - ((List)o).size(); - } - else + return this.size() - ((List) o).size(); + } else return 1; - - + } + private List getList() { return lazy.get(); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyListX stream(Flux stream){ - return new LazyListX(stream); + public LazyListX stream(Flux stream) { + return new LazyListX( + stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() */ @Override public ReactiveSeq stream() { - return ReactiveSeq.fromStream(lazy.get().stream()); + return ReactiveSeq.fromStream(lazy.get() + .stream()); } + @Override public Flux flux() { return lazy.flux(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#combine(java. + * util.function.BiPredicate, java.util.function.BinaryOperator) */ @Override public LazyListX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyListX)super.combine(predicate, op); + + return (LazyListX) super.combine(predicate, op); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.ListX#reverse() */ @Override public LazyListX reverse() { - - return(LazyListX)super.reverse(); + + return (LazyListX) super.reverse(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#filter(java. + * util.function.Predicate) */ @Override public LazyListX filter(Predicate pred) { - - return (LazyListX)super.filter(pred); + + return (LazyListX) super.filter(pred); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#map(java.util. + * function.Function) */ @Override public LazyListX map(Function mapper) { - - return (LazyListX)super.map(mapper); + + return (LazyListX) super.map(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#flatMap(java. + * util.function.Function) */ @Override public LazyListX flatMap(Function> mapper) { - return (LazyListX)super.flatMap(mapper); + return (LazyListX) super.flatMap(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#limit(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#limit(long) */ @Override public LazyListX limit(long num) { - return (LazyListX)super.limit(num); + return (LazyListX) super.limit(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#skip(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#skip(long) */ @Override public LazyListX skip(long num) { - return (LazyListX)super.skip(num); + return (LazyListX) super.skip(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#takeRight(int) */ @Override public LazyListX takeRight(int num) { - return (LazyListX)super.takeRight(num); + return (LazyListX) super.takeRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#dropRight(int) */ @Override public LazyListX dropRight(int num) { - return (LazyListX)super.dropRight(num); + return (LazyListX) super.dropRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#takeWhile(java + * .util.function.Predicate) */ @Override public LazyListX takeWhile(Predicate p) { - return (LazyListX)super.takeWhile(p); + return (LazyListX) super.takeWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#dropWhile(java + * .util.function.Predicate) */ @Override public LazyListX dropWhile(Predicate p) { - return (LazyListX)super.dropWhile(p); + return (LazyListX) super.dropWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#takeUntil(java + * .util.function.Predicate) */ @Override public LazyListX takeUntil(Predicate p) { - return (LazyListX)super.takeUntil(p); + return (LazyListX) super.takeUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#dropUntil(java + * .util.function.Predicate) */ @Override public LazyListX dropUntil(Predicate p) { - return(LazyListX)super.dropUntil(p); + return (LazyListX) super.dropUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#trampoline( + * java.util.function.Function) */ @Override public LazyListX trampoline(Function> mapper) { - return (LazyListX)super.trampoline(mapper); + return (LazyListX) super.trampoline(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#slice(long, + * long) */ @Override public LazyListX slice(long from, long to) { - return (LazyListX)super.slice(from, to); + return (LazyListX) super.slice(from, to); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(int) */ @Override public LazyListX> grouped(int groupSize) { - - return (LazyListX>)super.grouped(groupSize); + + return (LazyListX>) super.grouped(groupSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(java. + * util.function.Function, java.util.stream.Collector) */ @Override public LazyListX> grouped(Function classifier, Collector downstream) { - - return (LazyListX)super.grouped(classifier, downstream); + + return (LazyListX) super.grouped(classifier, downstream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(java. + * util.function.Function) */ @Override public LazyListX>> grouped(Function classifier) { - - return (LazyListX)super.grouped(classifier); + + return (LazyListX) super.grouped(classifier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip(java.lang. + * Iterable) */ @Override public LazyListX> zip(Iterable other) { - - return (LazyListX)super.zip(other); + + return (LazyListX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip(java.lang. + * Iterable, java.util.function.BiFunction) */ @Override public LazyListX zip(Iterable other, BiFunction zipper) { - - return (LazyListX)super.zip(other, zipper); + + return (LazyListX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sliding(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#sliding(int) */ @Override public LazyListX> sliding(int windowSize) { - - return (LazyListX>)super.sliding(windowSize); + + return (LazyListX>) super.sliding(windowSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#sliding(int, + * int) */ @Override public LazyListX> sliding(int windowSize, int increment) { - - return (LazyListX>)super.sliding(windowSize, increment); + + return (LazyListX>) super.sliding(windowSize, increment); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#scanLeft(com. + * aol.cyclops.Monoid) */ @Override public LazyListX scanLeft(Monoid monoid) { - - return (LazyListX)super.scanLeft(monoid); + + return (LazyListX) super.scanLeft(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#scanLeft(java. + * lang.Object, java.util.function.BiFunction) */ @Override public LazyListX scanLeft(U seed, BiFunction function) { - + return (LazyListX) super.scanLeft(seed, function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#scanRight(com. + * aol.cyclops.Monoid) */ @Override public LazyListX scanRight(Monoid monoid) { - - return (LazyListX)super.scanRight(monoid); + + return (LazyListX) super.scanRight(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#scanRight(java + * .lang.Object, java.util.function.BiFunction) */ @Override public LazyListX scanRight(U identity, BiFunction combiner) { - - return (LazyListX)super.scanRight(identity, combiner); + + return (LazyListX) super.scanRight(identity, combiner); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#sorted(java. + * util.function.Function) */ @Override public > LazyListX sorted(Function function) { - - return (LazyListX)super.sorted(function); + + return (LazyListX) super.sorted(function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plus(java.lang + * .Object) */ @Override public LazyListX plus(T e) { - - return (LazyListX)super.plus(e); + + return (LazyListX) super.plus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plusAll(java. + * util.Collection) */ @Override public LazyListX plusAll(Collection list) { - - return (LazyListX)super.plusAll(list); + + return (LazyListX) super.plusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minus(java. + * lang.Object) */ @Override public LazyListX minus(Object e) { - - return (LazyListX)super.minus(e); + + return (LazyListX) super.minus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minusAll(java. + * util.Collection) */ @Override public LazyListX minusAll(Collection list) { - - return (LazyListX)super.minusAll(list); + + return (LazyListX) super.minusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plusLazy(java. + * lang.Object) */ @Override public LazyListX plusLazy(T e) { - - return (LazyListX)super.plusLazy(e); + + return (LazyListX) super.plusLazy(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plusAllLazy( + * java.util.Collection) */ @Override public LazyListX plusAllLazy(Collection list) { - - return (LazyListX)super.plusAllLazy(list); + + return (LazyListX) super.plusAllLazy(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minusLazy(java + * .lang.Object) */ @Override public LazyListX minusLazy(Object e) { - - return (LazyListX)super.minusLazy(e); + + return (LazyListX) super.minusLazy(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minusAllLazy( + * java.util.Collection) */ @Override public LazyListX minusAllLazy(Collection list) { - - return (LazyListX)super.minusAllLazy(list); + + return (LazyListX) super.minusAllLazy(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cycle(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cycle(int) */ @Override public LazyListX cycle(int times) { - - return (LazyListX)super.cycle(times); + + return (LazyListX) super.cycle(times); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cycle(com.aol. + * cyclops.Monoid, int) */ @Override public LazyListX cycle(Monoid m, int times) { - - return (LazyListX)super.cycle(m, times); + + return (LazyListX) super.cycle(m, times); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cycleWhile( + * java.util.function.Predicate) */ @Override public LazyListX cycleWhile(Predicate predicate) { - - return (LazyListX)super.cycleWhile(predicate); + + return (LazyListX) super.cycleWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cycleUntil( + * java.util.function.Predicate) */ @Override public LazyListX cycleUntil(Predicate predicate) { - - return (LazyListX)super.cycleUntil(predicate); + + return (LazyListX) super.cycleUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip(org.jooq. + * lambda.Seq) */ @Override public LazyListX> zip(Seq other) { - - return (LazyListX)super.zip(other); + + return (LazyListX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip3(java.util + * .stream.Stream, java.util.stream.Stream) */ @Override public LazyListX> zip3(Stream second, Stream third) { - - return (LazyListX)super.zip3(second, third); + + return (LazyListX) super.zip3(second, third); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zip4(java.util + * .stream.Stream, java.util.stream.Stream, java.util.stream.Stream) */ @Override public LazyListX> zip4(Stream second, Stream third, Stream fourth) { - - return (LazyListX)super.zip4(second, third, fourth); + + return (LazyListX) super.zip4(second, third, fourth); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#zipWithIndex() */ @Override public LazyListX> zipWithIndex() { - - return (LazyListX>)super.zipWithIndex(); + + return (LazyListX>) super.zipWithIndex(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#distinct() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#distinct() */ @Override public LazyListX distinct() { - - return (LazyListX)super.distinct(); + + return (LazyListX) super.distinct(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sorted() */ @Override public LazyListX sorted() { - - return (LazyListX)super.sorted(); + + return (LazyListX) super.sorted(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#sorted(java. + * util.Comparator) */ @Override public LazyListX sorted(Comparator c) { - - return (LazyListX)super.sorted(c); + + return (LazyListX) super.sorted(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#skipWhile(java + * .util.function.Predicate) */ @Override public LazyListX skipWhile(Predicate p) { - - return (LazyListX)super.skipWhile(p); + + return (LazyListX) super.skipWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#skipUntil(java + * .util.function.Predicate) */ @Override public LazyListX skipUntil(Predicate p) { - - return (LazyListX)super.skipUntil(p); + + return (LazyListX) super.skipUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#limitWhile( + * java.util.function.Predicate) */ @Override public LazyListX limitWhile(Predicate p) { - - return (LazyListX)super.limitWhile(p); + + return (LazyListX) super.limitWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#limitUntil( + * java.util.function.Predicate) */ @Override public LazyListX limitUntil(Predicate p) { - - return (LazyListX)super.limitUntil(p); + + return (LazyListX) super.limitUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#intersperse( + * java.lang.Object) */ @Override public LazyListX intersperse(T value) { - - return (LazyListX)super.intersperse(value); + + return (LazyListX) super.intersperse(value); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.ListX#shuffle() */ @Override public LazyListX shuffle() { - - return (LazyListX)super.shuffle(); + + return (LazyListX) super.shuffle(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#skipLast(int) */ @Override public LazyListX skipLast(int num) { - - return (LazyListX)super.skipLast(num); + + return (LazyListX) super.skipLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#limitLast(int) */ @Override public LazyListX limitLast(int num) { - - return (LazyListX)super.limitLast(num); + + return (LazyListX) super.limitLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmpty(java. + * lang.Object) */ @Override public LazyListX onEmpty(T value) { - - return (LazyListX)super.onEmpty(value); + + return (LazyListX) super.onEmpty(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptyGet( + * java.util.function.Supplier) */ @Override public LazyListX onEmptyGet(Supplier supplier) { - - return (LazyListX)super.onEmptyGet(supplier); + + return (LazyListX) super.onEmptyGet(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptyThrow( + * java.util.function.Supplier) */ @Override public LazyListX onEmptyThrow(Supplier supplier) { - - return (LazyListX)super.onEmptyThrow(supplier); + + return (LazyListX) super.onEmptyThrow(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#shuffle(java. + * util.Random) */ @Override public LazyListX shuffle(Random random) { - - return (LazyListX)super.shuffle(random); + + return (LazyListX) super.shuffle(random); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#ofType(java. + * lang.Class) */ @Override public LazyListX ofType(Class type) { - - return (LazyListX)super.ofType(type); + + return (LazyListX) super.ofType(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#filterNot(java + * .util.function.Predicate) */ @Override public LazyListX filterNot(Predicate fn) { - - return (LazyListX)super.filterNot(fn); + + return (LazyListX) super.filterNot(fn); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.ListX#notNull() */ @Override public LazyListX notNull() { - - return (LazyListX)super.notNull(); + + return (LazyListX) super.notNull(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java + * .util.stream.Stream) */ @Override public LazyListX removeAll(Stream stream) { - - return (LazyListX)(super.removeAll(stream)); + + return (LazyListX) (super.removeAll(stream)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(org. + * jooq.lambda.Seq) */ @Override public LazyListX removeAll(Seq stream) { - - return (LazyListX)super.removeAll(stream); + + return (LazyListX) super.removeAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java + * .lang.Iterable) */ @Override public LazyListX removeAll(Iterable it) { - - return (LazyListX)super.removeAll(it); + + return (LazyListX) super.removeAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#removeAll(java + * .lang.Object[]) */ @Override public LazyListX removeAll(T... values) { - - return (LazyListX)super.removeAll(values); + + return (LazyListX) super.removeAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java + * .lang.Iterable) */ @Override public LazyListX retainAll(Iterable it) { - - return (LazyListX)super.retainAll(it); + + return (LazyListX) super.retainAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java + * .util.stream.Stream) */ @Override public LazyListX retainAll(Stream stream) { - - return (LazyListX)super.retainAll(stream); + + return (LazyListX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(org. + * jooq.lambda.Seq) */ @Override public LazyListX retainAll(Seq stream) { - - return (LazyListX)super.retainAll(stream); + + return (LazyListX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#retainAll(java + * .lang.Object[]) */ @Override public LazyListX retainAll(T... values) { - - return (LazyListX)super.retainAll(values); + + return (LazyListX) super.retainAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#cast(java.lang + * .Class) */ @Override public LazyListX cast(Class type) { - - return (LazyListX)super.cast(type); + + return (LazyListX) super.cast(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#patternMatch( + * java.util.function.Function, java.util.function.Supplier) */ @Override public LazyListX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyListX)super.patternMatch(case1, otherwise); + + return (LazyListX) super.patternMatch(case1, otherwise); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#permutations() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#permutations() */ @Override public LazyListX> permutations() { - - return (LazyListX>)super.permutations(); + + return (LazyListX>) super.permutations(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#combinations(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#combinations( + * int) */ @Override public LazyListX> combinations(int size) { - - return (LazyListX>)super.combinations(size); + + return (LazyListX>) super.combinations(size); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#combinations() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#combinations() */ @Override public LazyListX> combinations() { - - return (LazyListX>)super.combinations(); + + return (LazyListX>) super.combinations(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#grouped(int, + * java.util.function.Supplier) */ @Override public > LazyListX grouped(int size, Supplier supplier) { - - return (LazyListX)super.grouped(size, supplier); + + return (LazyListX) super.grouped(size, supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#groupedUntil( + * java.util.function.Predicate) */ @Override public LazyListX> groupedUntil(Predicate predicate) { - - return (LazyListX>)super.groupedUntil(predicate); + + return (LazyListX>) super.groupedUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#groupedWhile( + * java.util.function.Predicate) */ @Override public LazyListX> groupedWhile(Predicate predicate) { - - return (LazyListX>)super.groupedWhile(predicate); + + return (LazyListX>) super.groupedWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#groupedWhile( + * java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazyListX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyListX)super.groupedWhile(predicate, factory); + + return (LazyListX) super.groupedWhile(predicate, factory); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#groupedUntil( + * java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazyListX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyListX)super.groupedUntil(predicate, factory); + + return (LazyListX) super.groupedUntil(predicate, factory); } - + /** ListX methods **/ - /* Makes a defensive copy of this ListX replacing the value at i with the specified element - * (non-Javadoc) - * @see com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with(int, java.lang.Object) + /* + * Makes a defensive copy of this ListX replacing the value at i with the + * specified element (non-Javadoc) + * + * @see + * com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with( + * int, java.lang.Object) */ - public LazyListX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyListX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#minus(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#minus(int) */ @Override - public LazyListX minus(int pos){ + public LazyListX minus(int pos) { remove(pos); return this; } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plus(int, java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plus(int, + * java.lang.Object) */ @Override - public LazyListX plus(int i, T e){ - add(i,e); + public LazyListX plus(int i, T e) { + add(i, e); return this; } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#plusAll(int, java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#plusAll(int, + * java.util.Collection) */ @Override - public LazyListX plusAll(int i, Collection list){ - addAll(i,list); + public LazyListX plusAll(int i, Collection list) { + addAll(i, list); return this; } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#unit(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #unit(java.util.Collection) */ @Override - public LazyListX unit(Collection col){ + public LazyListX unit(Collection col) { return LazyListX.fromIterable(col); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Unit#unit(java.lang.Object) */ @Override - public LazyListX unit(R value){ + public LazyListX unit(R value) { return LazyListX.singleton(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#unitIterator(java.util.Iterator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#unitIterator(java.util.Iterator) */ @Override - public LazyListX unitIterator(Iterator it){ - return LazyListX.fromIterable(()->it); + public LazyListX unitIterator(Iterator it) { + return LazyListX.fromIterable(() -> it); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazyListX plusInOrder(T e) { - - return (LazyListX)super.plusInOrder(e); + + return (LazyListX) super.plusInOrder(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazyListX from(Collection c) { - if(c instanceof List) - return new LazyListX((List)c,(Collector)collector); - return new LazyListX((List)c.stream().collect(Collectors.toList()),(Collector)this.collector); + if (c instanceof List) + return new LazyListX( + (List) c, (Collector) collector); + return new LazyListX( + (List) c.stream() + .collect(Collectors.toList()), + (Collector) this.collector); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyListX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyListX>)super.groupedStatefullyUntil(predicate); + + return (LazyListX>) super.groupedStatefullyUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyListX peek(Consumer c) { - - return (LazyListX)super.peek(c); + + return (LazyListX) super.peek(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazyListX zip(Seq other, - BiFunction zipper) { - - return (LazyListX)super.zip(other, zipper); + public LazyListX zip(Seq other, BiFunction zipper) { + + return (LazyListX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazyListX zip(Stream other, - BiFunction zipper) { - - return (LazyListX)super.zip(other, zipper); + public LazyListX zip(Stream other, BiFunction zipper) { + + return (LazyListX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyListX> zip(Stream other) { - - return (LazyListX)super.zip(other); + + return (LazyListX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyListX zip(BiFunction fn, Publisher publisher) { - - return (LazyListX)super.zip(fn, publisher); + + return (LazyListX) super.zip(fn, publisher); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#fromStream(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#fromStream( + * java.util.stream.Stream) */ @Override public LazyListX fromStream(Stream stream) { - List list = (List) stream.collect((Collector)getCollector()); - return new LazyListX(list, (Collector)getCollector()); + List list = (List) stream.collect((Collector) getCollector()); + return new LazyListX( + list, (Collector) getCollector()); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.ListX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazyListX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); } - } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyQueueX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyQueueX.java index ee08b454..12119e42 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyQueueX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazyQueueX.java @@ -66,21 +66,22 @@ * * @param the type of elements held in this collection */ -public class LazyQueueX extends AbstractFluentCollectionX implements QueueX { - private final LazyFluentCollection> lazy; +public class LazyQueueX extends AbstractFluentCollectionXimplements QueueX { + private final LazyFluentCollection> lazy; @Getter - private final Collector> collector; - - + private final Collector> collector; + /** * Create a LazyQueueX from a Stream * * @param stream to construct a LazyQueueX from * @return LazyQueueX */ - public static LazyQueueX fromStreamS(Stream stream){ - return new LazyQueueX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazyQueueX fromStreamS(Stream stream) { + return new LazyQueueX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazyQueueX that contains the Integers between start and end * @@ -136,7 +137,7 @@ public static LazyQueueX unfold(U seed, Function LazyQueueX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -149,10 +150,9 @@ public static LazyQueueX generate(long limit, Supplier s) { */ public static LazyQueueX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazyQueueX */ @@ -160,14 +160,13 @@ public static LazyQueueX iterate(long limit, final T seed, final UnaryOpe return Collectors.toCollection(() -> LazyQueueX.of()); } - - /** * @return An empty LazyQueueX */ public static LazyQueueX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -188,8 +187,9 @@ public static LazyQueueX empty() { */ @SafeVarargs public static LazyQueueX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -230,7 +230,7 @@ public static LazyQueueX fromPublisher(Publisher publisher) * @return LazyQueueX from Iterable */ public static LazyQueueX fromIterable(Iterable it) { - return fromIterable(QueueX.defaultCollector(), it); + return fromIterable(QueueX. defaultCollector(), it); } /** @@ -243,39 +243,51 @@ public static LazyQueueX fromIterable(Iterable it) { public static LazyQueueX fromIterable(Collector> collector, Iterable it) { if (it instanceof LazyQueueX) return (LazyQueueX) it; - + if (it instanceof Queue) return new LazyQueueX( - (Queue) it, collector); + (Queue) it, collector); return new LazyQueueX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazyQueueX(Queue list,Collector> collector){ - this.lazy = new LazyCollection<>(list,null,collector); - this.collector= collector; + + private LazyQueueX(Queue list, Collector> collector) { + this.lazy = new LazyCollection<>( + list, null, collector); + this.collector = collector; } - - private LazyQueueX(Queue list){ + + private LazyQueueX(Queue list) { this.collector = QueueX.defaultCollector(); - this.lazy = new LazyCollection>(list,null,collector); + this.lazy = new LazyCollection>( + list, null, collector); } - private LazyQueueX(Flux stream,Collector> collector){ - + + private LazyQueueX(Flux stream, Collector> collector) { + this.collector = collector; - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazyQueueX(Flux stream){ - + + private LazyQueueX(Flux stream) { + this.collector = QueueX.defaultCollector(); - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazyQueueX(){ + + private LazyQueueX() { this.collector = QueueX.defaultCollector(); - this.lazy = new LazyCollection<>((Queue)this.collector.supplier().get(),null,collector); + this.lazy = new LazyCollection<>( + (Queue) this.collector.supplier() + .get(), + null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -283,7 +295,9 @@ public void forEach(Consumer action) { getQueue().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -291,7 +305,9 @@ public Iterator iterator() { return getQueue().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -299,7 +315,9 @@ public int size() { return getQueue().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -307,7 +325,9 @@ public boolean contains(Object e) { return getQueue().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -315,9 +335,9 @@ public boolean equals(Object o) { return getQueue().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -325,7 +345,9 @@ public boolean isEmpty() { return getQueue().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -333,7 +355,9 @@ public int hashCode() { return getQueue().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -341,7 +365,9 @@ public Object[] toArray() { return getQueue().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -349,7 +375,9 @@ public boolean removeAll(Collection c) { return getQueue().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -357,7 +385,9 @@ public T[] toArray(T[] a) { return getQueue().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -365,7 +395,9 @@ public boolean add(T e) { return getQueue().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -373,7 +405,9 @@ public boolean remove(Object o) { return getQueue().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -381,7 +415,9 @@ public boolean containsAll(Collection c) { return getQueue().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -389,7 +425,9 @@ public boolean addAll(Collection c) { return getQueue().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -397,7 +435,9 @@ public boolean retainAll(Collection c) { return getQueue().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -405,8 +445,9 @@ public void clear() { getQueue().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -414,7 +455,9 @@ public String toString() { return getQueue().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -422,852 +465,1311 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getQueue().removeIf(filter); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getQueue().parallelStream(); } - - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getQueue().spliterator(); } - + private Queue getQueue() { return lazy.get(); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazyQueueX stream(Flux stream){ - return new LazyQueueX(stream); + public LazyQueueX stream(Flux stream) { + return new LazyQueueX( + stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() */ @Override public ReactiveSeq stream() { - return ReactiveSeq.fromStream(lazy.get().stream()); + return ReactiveSeq.fromStream(lazy.get() + .stream()); } + @Override public Flux flux() { return lazy.flux(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#combine(java. + * util.function.BiPredicate, java.util.function.BinaryOperator) */ @Override public LazyQueueX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazyQueueX)super.combine(predicate, op); + + return (LazyQueueX) super.combine(predicate, op); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#reverse() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#reverse() */ @Override public LazyQueueX reverse() { - - return(LazyQueueX)super.reverse(); + + return (LazyQueueX) super.reverse(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#filter(java. + * util.function.Predicate) */ @Override public LazyQueueX filter(Predicate pred) { - - return (LazyQueueX)super.filter(pred); + + return (LazyQueueX) super.filter(pred); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#map(java.util + * .function.Function) */ @Override public LazyQueueX map(Function mapper) { - - return (LazyQueueX)super.map(mapper); + + return (LazyQueueX) super.map(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#flatMap(java. + * util.function.Function) */ @Override public LazyQueueX flatMap(Function> mapper) { - return (LazyQueueX)super.flatMap(mapper); + return (LazyQueueX) super.flatMap(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#limit(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#limit(long) */ @Override public LazyQueueX limit(long num) { - return (LazyQueueX)super.limit(num); + return (LazyQueueX) super.limit(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#skip(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#skip(long) */ @Override public LazyQueueX skip(long num) { - return (LazyQueueX)super.skip(num); + return (LazyQueueX) super.skip(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#takeRight( + * int) */ @Override public LazyQueueX takeRight(int num) { - return (LazyQueueX)super.takeRight(num); + return (LazyQueueX) super.takeRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#dropRight( + * int) */ @Override public LazyQueueX dropRight(int num) { - return (LazyQueueX)super.dropRight(num); + return (LazyQueueX) super.dropRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#takeWhile( + * java.util.function.Predicate) */ @Override public LazyQueueX takeWhile(Predicate p) { - return (LazyQueueX)super.takeWhile(p); + return (LazyQueueX) super.takeWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#dropWhile( + * java.util.function.Predicate) */ @Override public LazyQueueX dropWhile(Predicate p) { - return (LazyQueueX)super.dropWhile(p); + return (LazyQueueX) super.dropWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#takeUntil( + * java.util.function.Predicate) */ @Override public LazyQueueX takeUntil(Predicate p) { - return (LazyQueueX)super.takeUntil(p); + return (LazyQueueX) super.takeUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#dropUntil( + * java.util.function.Predicate) */ @Override public LazyQueueX dropUntil(Predicate p) { - return(LazyQueueX)super.dropUntil(p); + return (LazyQueueX) super.dropUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#trampoline( + * java.util.function.Function) */ @Override public LazyQueueX trampoline(Function> mapper) { - return (LazyQueueX)super.trampoline(mapper); + return (LazyQueueX) super.trampoline(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#slice(long, + * long) */ @Override public LazyQueueX slice(long from, long to) { - return (LazyQueueX)super.slice(from, to); + return (LazyQueueX) super.slice(from, to); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#grouped(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#grouped(int) */ @Override public LazyQueueX> grouped(int groupSize) { - - return (LazyQueueX>)super.grouped(groupSize); + + return (LazyQueueX>) super.grouped(groupSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#grouped(java. + * util.function.Function, java.util.stream.Collector) */ @Override public LazyQueueX> grouped(Function classifier, Collector downstream) { - - return (LazyQueueX)super.grouped(classifier, downstream); + + return (LazyQueueX) super.grouped(classifier, downstream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#grouped(java. + * util.function.Function) */ @Override public LazyQueueX>> grouped(Function classifier) { - - return (LazyQueueX)super.grouped(classifier); + + return (LazyQueueX) super.grouped(classifier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#zip(java.lang + * .Iterable) */ @Override public LazyQueueX> zip(Iterable other) { - - return (LazyQueueX)super.zip(other); + + return (LazyQueueX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#zip(java.lang + * .Iterable, java.util.function.BiFunction) */ @Override public LazyQueueX zip(Iterable other, BiFunction zipper) { - - return (LazyQueueX)super.zip(other, zipper); + + return (LazyQueueX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#sliding(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#sliding(int) */ @Override public LazyQueueX> sliding(int windowSize) { - - return (LazyQueueX>)super.sliding(windowSize); + + return (LazyQueueX>) super.sliding(windowSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#sliding(int, + * int) */ @Override public LazyQueueX> sliding(int windowSize, int increment) { - - return (LazyQueueX>)super.sliding(windowSize, increment); + + return (LazyQueueX>) super.sliding(windowSize, increment); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#scanLeft(com. + * aol.cyclops.Monoid) */ @Override public LazyQueueX scanLeft(Monoid monoid) { - - return (LazyQueueX)super.scanLeft(monoid); + + return (LazyQueueX) super.scanLeft(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#scanLeft(java + * .lang.Object, java.util.function.BiFunction) */ @Override public LazyQueueX scanLeft(U seed, BiFunction function) { - + return (LazyQueueX) super.scanLeft(seed, function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#scanRight(com + * .aol.cyclops.Monoid) */ @Override public LazyQueueX scanRight(Monoid monoid) { - - return (LazyQueueX)super.scanRight(monoid); + + return (LazyQueueX) super.scanRight(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#scanRight( + * java.lang.Object, java.util.function.BiFunction) */ @Override public LazyQueueX scanRight(U identity, BiFunction combiner) { - - return (LazyQueueX)super.scanRight(identity, combiner); + + return (LazyQueueX) super.scanRight(identity, combiner); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#sorted(java. + * util.function.Function) */ @Override public > LazyQueueX sorted(Function function) { - - return (LazyQueueX)super.sorted(function); + + return (LazyQueueX) super.sorted(function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#plus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#plus(java. + * lang.Object) */ @Override public LazyQueueX plus(T e) { - - return (LazyQueueX)super.plus(e); + + return (LazyQueueX) super.plus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#plusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#plusAll(java. + * util.Collection) */ @Override public LazyQueueX plusAll(Collection list) { - - return (LazyQueueX)super.plusAll(list); + + return (LazyQueueX) super.plusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#minus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#minus(java. + * lang.Object) */ @Override public LazyQueueX minus(Object e) { - - return (LazyQueueX)super.minus(e); + + return (LazyQueueX) super.minus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#minusAll(java + * .util.Collection) */ @Override public LazyQueueX minusAll(Collection list) { - - return (LazyQueueX)super.minusAll(list); + + return (LazyQueueX) super.minusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#plusLazy(java + * .lang.Object) */ @Override public LazyQueueX plusLazy(T e) { - - return (LazyQueueX)super.plusLazy(e); + + return (LazyQueueX) super.plusLazy(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#plusAllLazy( + * java.util.Collection) */ @Override public LazyQueueX plusAllLazy(Collection list) { - - return (LazyQueueX)super.plusAllLazy(list); + + return (LazyQueueX) super.plusAllLazy(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#minusLazy( + * java.lang.Object) */ @Override public LazyQueueX minusLazy(Object e) { - - return (LazyQueueX)super.minusLazy(e); + + return (LazyQueueX) super.minusLazy(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#minusAllLazy( + * java.util.Collection) */ @Override public LazyQueueX minusAllLazy(Collection list) { - - return (LazyQueueX)super.minusAllLazy(list); + + return (LazyQueueX) super.minusAllLazy(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#cycle(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#cycle(int) */ @Override public LazyQueueX cycle(int times) { - - return (LazyQueueX)super.cycle(times); + + return (LazyQueueX) super.cycle(times); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#cycle(com.aol + * .cyclops.Monoid, int) */ @Override public LazyQueueX cycle(Monoid m, int times) { - - return (LazyQueueX)super.cycle(m, times); + + return (LazyQueueX) super.cycle(m, times); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#cycleWhile( + * java.util.function.Predicate) */ @Override public LazyQueueX cycleWhile(Predicate predicate) { - - return (LazyQueueX)super.cycleWhile(predicate); + + return (LazyQueueX) super.cycleWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#cycleUntil( + * java.util.function.Predicate) */ @Override public LazyQueueX cycleUntil(Predicate predicate) { - - return (LazyQueueX)super.cycleUntil(predicate); + + return (LazyQueueX) super.cycleUntil(predicate); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#zip(org.jooq. + * lambda.Seq) */ @Override public LazyQueueX> zip(Seq other) { - - return (LazyQueueX)super.zip(other); + + return (LazyQueueX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#zip3(java. + * util.stream.Stream, java.util.stream.Stream) */ @Override public LazyQueueX> zip3(Stream second, Stream third) { - - return (LazyQueueX)super.zip3(second, third); + + return (LazyQueueX) super.zip3(second, third); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#zip4(java. + * util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) */ @Override public LazyQueueX> zip4(Stream second, Stream third, Stream fourth) { - - return (LazyQueueX)super.zip4(second, third, fourth); + + return (LazyQueueX) super.zip4(second, third, fourth); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#zipWithIndex( + * ) */ @Override public LazyQueueX> zipWithIndex() { - - return (LazyQueueX>)super.zipWithIndex(); + + return (LazyQueueX>) super.zipWithIndex(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#distinct() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#distinct() */ @Override public LazyQueueX distinct() { - - return (LazyQueueX)super.distinct(); + + return (LazyQueueX) super.distinct(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#sorted() */ @Override public LazyQueueX sorted() { - - return (LazyQueueX)super.sorted(); + + return (LazyQueueX) super.sorted(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#sorted(java. + * util.Comparator) */ @Override public LazyQueueX sorted(Comparator c) { - - return (LazyQueueX)super.sorted(c); + + return (LazyQueueX) super.sorted(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#skipWhile( + * java.util.function.Predicate) */ @Override public LazyQueueX skipWhile(Predicate p) { - - return (LazyQueueX)super.skipWhile(p); + + return (LazyQueueX) super.skipWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#skipUntil( + * java.util.function.Predicate) */ @Override public LazyQueueX skipUntil(Predicate p) { - - return (LazyQueueX)super.skipUntil(p); + + return (LazyQueueX) super.skipUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#limitWhile( + * java.util.function.Predicate) */ @Override public LazyQueueX limitWhile(Predicate p) { - - return (LazyQueueX)super.limitWhile(p); + + return (LazyQueueX) super.limitWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#limitUntil( + * java.util.function.Predicate) */ @Override public LazyQueueX limitUntil(Predicate p) { - - return (LazyQueueX)super.limitUntil(p); + + return (LazyQueueX) super.limitUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#intersperse( + * java.lang.Object) */ @Override public LazyQueueX intersperse(T value) { - - return (LazyQueueX)super.intersperse(value); + + return (LazyQueueX) super.intersperse(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#shuffle() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#shuffle() */ @Override public LazyQueueX shuffle() { - - return (LazyQueueX)super.shuffle(); + + return (LazyQueueX) super.shuffle(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#skipLast(int) */ @Override public LazyQueueX skipLast(int num) { - - return (LazyQueueX)super.skipLast(num); + + return (LazyQueueX) super.skipLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#limitLast( + * int) */ @Override public LazyQueueX limitLast(int num) { - - return (LazyQueueX)super.limitLast(num); + + return (LazyQueueX) super.limitLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#onEmpty(java. + * lang.Object) */ @Override public LazyQueueX onEmpty(T value) { - - return (LazyQueueX)super.onEmpty(value); + + return (LazyQueueX) super.onEmpty(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#onEmptyGet( + * java.util.function.Supplier) */ @Override public LazyQueueX onEmptyGet(Supplier supplier) { - - return (LazyQueueX)super.onEmptyGet(supplier); + + return (LazyQueueX) super.onEmptyGet(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#onEmptyThrow( + * java.util.function.Supplier) */ @Override public LazyQueueX onEmptyThrow(Supplier supplier) { - - return (LazyQueueX)super.onEmptyThrow(supplier); + + return (LazyQueueX) super.onEmptyThrow(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#shuffle(java. + * util.Random) */ @Override public LazyQueueX shuffle(Random random) { - - return (LazyQueueX)super.shuffle(random); + + return (LazyQueueX) super.shuffle(random); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#ofType(java. + * lang.Class) */ @Override public LazyQueueX ofType(Class type) { - - return (LazyQueueX)super.ofType(type); + + return (LazyQueueX) super.ofType(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#filterNot( + * java.util.function.Predicate) */ @Override public LazyQueueX filterNot(Predicate fn) { - - return (LazyQueueX)super.filterNot(fn); + + return (LazyQueueX) super.filterNot(fn); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#notNull() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#notNull() */ @Override public LazyQueueX notNull() { - - return (LazyQueueX)super.notNull(); + + return (LazyQueueX) super.notNull(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#removeAll( + * java.util.stream.Stream) */ @Override public LazyQueueX removeAll(Stream stream) { - - return (LazyQueueX)(super.removeAll(stream)); + + return (LazyQueueX) (super.removeAll(stream)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#removeAll(org + * .jooq.lambda.Seq) */ @Override public LazyQueueX removeAll(Seq stream) { - - return (LazyQueueX)super.removeAll(stream); + + return (LazyQueueX) super.removeAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#removeAll( + * java.lang.Iterable) */ @Override public LazyQueueX removeAll(Iterable it) { - - return (LazyQueueX)super.removeAll(it); + + return (LazyQueueX) super.removeAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#removeAll( + * java.lang.Object[]) */ @Override public LazyQueueX removeAll(T... values) { - - return (LazyQueueX)super.removeAll(values); + + return (LazyQueueX) super.removeAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#retainAll( + * java.lang.Iterable) */ @Override public LazyQueueX retainAll(Iterable it) { - - return (LazyQueueX)super.retainAll(it); + + return (LazyQueueX) super.retainAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#retainAll( + * java.util.stream.Stream) */ @Override public LazyQueueX retainAll(Stream stream) { - - return (LazyQueueX)super.retainAll(stream); + + return (LazyQueueX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#retainAll(org + * .jooq.lambda.Seq) */ @Override public LazyQueueX retainAll(Seq stream) { - - return (LazyQueueX)super.retainAll(stream); + + return (LazyQueueX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#retainAll( + * java.lang.Object[]) */ @Override public LazyQueueX retainAll(T... values) { - - return (LazyQueueX)super.retainAll(values); + + return (LazyQueueX) super.retainAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#cast(java. + * lang.Class) */ @Override public LazyQueueX cast(Class type) { - - return (LazyQueueX)super.cast(type); + + return (LazyQueueX) super.cast(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#patternMatch( + * java.util.function.Function, java.util.function.Supplier) */ @Override public LazyQueueX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazyQueueX)super.patternMatch(case1, otherwise); + + return (LazyQueueX) super.patternMatch(case1, otherwise); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#permutations() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#permutations( + * ) */ @Override public LazyQueueX> permutations() { - - return (LazyQueueX>)super.permutations(); + + return (LazyQueueX>) super.permutations(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#combinations(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#combinations( + * int) */ @Override public LazyQueueX> combinations(int size) { - - return (LazyQueueX>)super.combinations(size); + + return (LazyQueueX>) super.combinations(size); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#combinations() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#combinations( + * ) */ @Override public LazyQueueX> combinations() { - - return (LazyQueueX>)super.combinations(); + + return (LazyQueueX>) super.combinations(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#grouped(int, + * java.util.function.Supplier) */ @Override public > LazyQueueX grouped(int size, Supplier supplier) { - - return (LazyQueueX)super.grouped(size, supplier); + + return (LazyQueueX) super.grouped(size, supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#groupedUntil( + * java.util.function.Predicate) */ @Override public LazyQueueX> groupedUntil(Predicate predicate) { - - return (LazyQueueX>)super.groupedUntil(predicate); + + return (LazyQueueX>) super.groupedUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#groupedWhile( + * java.util.function.Predicate) */ @Override public LazyQueueX> groupedWhile(Predicate predicate) { - - return (LazyQueueX>)super.groupedWhile(predicate); + + return (LazyQueueX>) super.groupedWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#groupedWhile( + * java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazyQueueX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazyQueueX)super.groupedWhile(predicate, factory); + + return (LazyQueueX) super.groupedWhile(predicate, factory); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#groupedUntil( + * java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazyQueueX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazyQueueX)super.groupedUntil(predicate, factory); + + return (LazyQueueX) super.groupedUntil(predicate, factory); } - + /** QueueX methods **/ - /* Makes a defensive copy of this QueueX replacing the value at i with the specified element - * (non-Javadoc) - * @see com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with(int, java.lang.Object) + /* + * Makes a defensive copy of this QueueX replacing the value at i with the + * specified element (non-Javadoc) + * + * @see + * com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with( + * int, java.lang.Object) */ - public LazyQueueX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazyQueueX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#unit(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #unit(java.util.Collection) */ @Override - public LazyQueueX unit(Collection col){ + public LazyQueueX unit(Collection col) { return LazyQueueX.fromIterable(col); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Unit#unit(java.lang.Object) */ @Override - public LazyQueueX unit(R value){ + public LazyQueueX unit(R value) { return LazyQueueX.singleton(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#unitIterator(java.util.Iterator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#unitIterator(java.util.Iterator) */ @Override - public LazyQueueX unitIterator(Iterator it){ - return LazyQueueX.fromIterable(()->it); + public LazyQueueX unitIterator(Iterator it) { + return LazyQueueX.fromIterable(() -> it); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazyQueueX plusInOrder(T e) { - - return (LazyQueueX)super.plusInOrder(e); + + return (LazyQueueX) super.plusInOrder(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazyQueueX from(Collection c) { - if(c instanceof List) - return new LazyQueueX((Queue)c,(Collector)collector); - return new LazyQueueX((Queue)c.stream().collect(QueueX.defaultCollector()),(Collector)this.collector); + if (c instanceof List) + return new LazyQueueX( + (Queue) c, (Collector) collector); + return new LazyQueueX( + (Queue) c.stream() + .collect(QueueX.defaultCollector()), + (Collector) this.collector); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazyQueueX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazyQueueX>)super.groupedStatefullyUntil(predicate); + + return (LazyQueueX>) super.groupedStatefullyUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazyQueueX peek(Consumer c) { - - return (LazyQueueX)super.peek(c); + + return (LazyQueueX) super.peek(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazyQueueX zip(Seq other, - BiFunction zipper) { - - return (LazyQueueX)super.zip(other, zipper); + public LazyQueueX zip(Seq other, BiFunction zipper) { + + return (LazyQueueX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazyQueueX zip(Stream other, - BiFunction zipper) { - - return (LazyQueueX)super.zip(other, zipper); + public LazyQueueX zip(Stream other, BiFunction zipper) { + + return (LazyQueueX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazyQueueX> zip(Stream other) { - - return (LazyQueueX)super.zip(other); + + return (LazyQueueX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazyQueueX zip(BiFunction fn, Publisher publisher) { - - return (LazyQueueX)super.zip(fn, publisher); + + return (LazyQueueX) super.zip(fn, publisher); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#fromStream(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#fromStream( + * java.util.stream.Stream) */ @Override public LazyQueueX fromStream(Stream stream) { - Queue list = (Queue) stream.collect((Collector)getCollector()); - return new LazyQueueX(list, (Collector)getCollector()); + Queue list = (Queue) stream.collect((Collector) getCollector()); + return new LazyQueueX( + list, (Collector) getCollector()); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.QueueX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.QueueX#onEmptySwitch + * (java.util.function.Supplier) */ @Override public LazyQueueX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Queue#offer(java.lang.Object) */ public boolean offer(T e) { return getQueue().offer(e); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Queue#remove() */ public T remove() { return getQueue().remove(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Queue#poll() */ public T poll() { return getQueue().poll(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Queue#element() */ public T element() { return getQueue().element(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Queue#peek() */ public T peek() { return getQueue().peek(); } - } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazySetX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazySetX.java index 5143686e..22ef51f4 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazySetX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazySetX.java @@ -70,21 +70,22 @@ * * @param the type of elements held in this collection */ -public class LazySetX extends AbstractFluentCollectionX implements SetX { - private final LazyFluentCollection> lazy; +public class LazySetX extends AbstractFluentCollectionXimplements SetX { + private final LazyFluentCollection> lazy; @Getter - private final Collector> collector; - - + private final Collector> collector; + /** * Create a LazySetX from a Stream * * @param stream to construct a LazySetX from * @return LazySetX */ - public static LazySetX fromStreamS(Stream stream){ - return new LazySetX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazySetX fromStreamS(Stream stream) { + return new LazySetX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazySetX that contains the Integers between start and end * @@ -140,7 +141,7 @@ public static LazySetX unfold(U seed, Function LazySetX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -153,10 +154,9 @@ public static LazySetX generate(long limit, Supplier s) { */ public static LazySetX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazySetX */ @@ -164,14 +164,13 @@ public static LazySetX iterate(long limit, final T seed, final UnaryOpera return Collectors.toCollection(() -> LazySetX.of()); } - - /** * @return An empty LazySetX */ public static LazySetX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -192,8 +191,9 @@ public static LazySetX empty() { */ @SafeVarargs public static LazySetX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -234,7 +234,7 @@ public static LazySetX fromPublisher(Publisher publisher) { * @return LazySetX from Iterable */ public static LazySetX fromIterable(Iterable it) { - return fromIterable(SetX.defaultCollector(), it); + return fromIterable(SetX. defaultCollector(), it); } /** @@ -247,39 +247,51 @@ public static LazySetX fromIterable(Iterable it) { public static LazySetX fromIterable(Collector> collector, Iterable it) { if (it instanceof LazySetX) return (LazySetX) it; - + if (it instanceof Set) return new LazySetX( - (Set) it, collector); + (Set) it, collector); return new LazySetX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazySetX(Set list,Collector> collector){ - this.lazy = new LazyCollection<>(list,null,collector); - this.collector= collector; + + private LazySetX(Set list, Collector> collector) { + this.lazy = new LazyCollection<>( + list, null, collector); + this.collector = collector; } - - private LazySetX(Set list){ + + private LazySetX(Set list) { this.collector = SetX.defaultCollector(); - this.lazy = new LazyCollection>(list,null,collector); + this.lazy = new LazyCollection>( + list, null, collector); } - private LazySetX(Flux stream,Collector> collector){ - + + private LazySetX(Flux stream, Collector> collector) { + this.collector = collector; - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazySetX(Flux stream){ - + + private LazySetX(Flux stream) { + this.collector = SetX.defaultCollector(); - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazySetX(){ + + private LazySetX() { this.collector = SetX.defaultCollector(); - this.lazy = new LazyCollection<>((Set)this.collector.supplier().get(),null,collector); + this.lazy = new LazyCollection<>( + (Set) this.collector.supplier() + .get(), + null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -287,7 +299,9 @@ public void forEach(Consumer action) { getSet().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -295,7 +309,9 @@ public Iterator iterator() { return getSet().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -303,7 +319,9 @@ public int size() { return getSet().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -311,7 +329,9 @@ public boolean contains(Object e) { return getSet().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -319,9 +339,9 @@ public boolean equals(Object o) { return getSet().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -329,7 +349,9 @@ public boolean isEmpty() { return getSet().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -337,7 +359,9 @@ public int hashCode() { return getSet().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -345,7 +369,9 @@ public Object[] toArray() { return getSet().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -353,7 +379,9 @@ public boolean removeAll(Collection c) { return getSet().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -361,7 +389,9 @@ public T[] toArray(T[] a) { return getSet().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -369,7 +399,9 @@ public boolean add(T e) { return getSet().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -377,7 +409,9 @@ public boolean remove(Object o) { return getSet().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -385,7 +419,9 @@ public boolean containsAll(Collection c) { return getSet().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -393,7 +429,9 @@ public boolean addAll(Collection c) { return getSet().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -401,7 +439,9 @@ public boolean retainAll(Collection c) { return getSet().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -409,8 +449,9 @@ public void clear() { getSet().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -418,7 +459,9 @@ public String toString() { return getSet().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -426,817 +469,1253 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getSet().removeIf(filter); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getSet().parallelStream(); } - - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getSet().spliterator(); } - + private Set getSet() { return lazy.get(); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazySetX stream(Flux stream){ - return new LazySetX(stream); + public LazySetX stream(Flux stream) { + return new LazySetX( + stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() */ @Override public ReactiveSeq stream() { - return ReactiveSeq.fromStream(lazy.get().stream()); + return ReactiveSeq.fromStream(lazy.get() + .stream()); } + @Override public Flux flux() { return lazy.flux(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#combine(java. + * util.function.BiPredicate, java.util.function.BinaryOperator) */ @Override public LazySetX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazySetX)super.combine(predicate, op); + + return (LazySetX) super.combine(predicate, op); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.SetX#reverse() */ @Override public LazySetX reverse() { - - return(LazySetX)super.reverse(); + + return (LazySetX) super.reverse(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#filter(java. + * util.function.Predicate) */ @Override public LazySetX filter(Predicate pred) { - - return (LazySetX)super.filter(pred); + + return (LazySetX) super.filter(pred); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#map(java.util. + * function.Function) */ @Override public LazySetX map(Function mapper) { - - return (LazySetX)super.map(mapper); + + return (LazySetX) super.map(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#flatMap(java. + * util.function.Function) */ @Override public LazySetX flatMap(Function> mapper) { - return (LazySetX)super.flatMap(mapper); + return (LazySetX) super.flatMap(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#limit(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#limit(long) */ @Override public LazySetX limit(long num) { - return (LazySetX)super.limit(num); + return (LazySetX) super.limit(num); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.SetX#skip(long) */ @Override public LazySetX skip(long num) { - return (LazySetX)super.skip(num); + return (LazySetX) super.skip(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#takeRight(int) */ @Override public LazySetX takeRight(int num) { - return (LazySetX)super.takeRight(num); + return (LazySetX) super.takeRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#dropRight(int) */ @Override public LazySetX dropRight(int num) { - return (LazySetX)super.dropRight(num); + return (LazySetX) super.dropRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#takeWhile(java. + * util.function.Predicate) */ @Override public LazySetX takeWhile(Predicate p) { - return (LazySetX)super.takeWhile(p); + return (LazySetX) super.takeWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#dropWhile(java. + * util.function.Predicate) */ @Override public LazySetX dropWhile(Predicate p) { - return (LazySetX)super.dropWhile(p); + return (LazySetX) super.dropWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#takeUntil(java. + * util.function.Predicate) */ @Override public LazySetX takeUntil(Predicate p) { - return (LazySetX)super.takeUntil(p); + return (LazySetX) super.takeUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#dropUntil(java. + * util.function.Predicate) */ @Override public LazySetX dropUntil(Predicate p) { - return(LazySetX)super.dropUntil(p); + return (LazySetX) super.dropUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#trampoline(java + * .util.function.Function) */ @Override public LazySetX trampoline(Function> mapper) { - return (LazySetX)super.trampoline(mapper); + return (LazySetX) super.trampoline(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#slice(long, + * long) */ @Override public LazySetX slice(long from, long to) { - return (LazySetX)super.slice(from, to); + return (LazySetX) super.slice(from, to); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#grouped(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#grouped(int) */ @Override public LazySetX> grouped(int groupSize) { - - return (LazySetX>)super.grouped(groupSize); + + return (LazySetX>) super.grouped(groupSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#grouped(java. + * util.function.Function, java.util.stream.Collector) */ @Override public LazySetX> grouped(Function classifier, Collector downstream) { - - return (LazySetX)super.grouped(classifier, downstream); + + return (LazySetX) super.grouped(classifier, downstream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#grouped(java. + * util.function.Function) */ @Override public LazySetX>> grouped(Function classifier) { - - return (LazySetX)super.grouped(classifier); + + return (LazySetX) super.grouped(classifier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#zip(java.lang. + * Iterable) */ @Override public LazySetX> zip(Iterable other) { - - return (LazySetX)super.zip(other); + + return (LazySetX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#zip(java.lang. + * Iterable, java.util.function.BiFunction) */ @Override public LazySetX zip(Iterable other, BiFunction zipper) { - - return (LazySetX)super.zip(other, zipper); + + return (LazySetX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#sliding(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#sliding(int) */ @Override public LazySetX> sliding(int windowSize) { - - return (LazySetX>)super.sliding(windowSize); + + return (LazySetX>) super.sliding(windowSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#sliding(int, + * int) */ @Override public LazySetX> sliding(int windowSize, int increment) { - - return (LazySetX>)super.sliding(windowSize, increment); + + return (LazySetX>) super.sliding(windowSize, increment); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#scanLeft(com. + * aol.cyclops.Monoid) */ @Override public LazySetX scanLeft(Monoid monoid) { - - return (LazySetX)super.scanLeft(monoid); + + return (LazySetX) super.scanLeft(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#scanLeft(java. + * lang.Object, java.util.function.BiFunction) */ @Override public LazySetX scanLeft(U seed, BiFunction function) { - + return (LazySetX) super.scanLeft(seed, function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#scanRight(com. + * aol.cyclops.Monoid) */ @Override public LazySetX scanRight(Monoid monoid) { - - return (LazySetX)super.scanRight(monoid); + + return (LazySetX) super.scanRight(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#scanRight(java. + * lang.Object, java.util.function.BiFunction) */ @Override public LazySetX scanRight(U identity, BiFunction combiner) { - - return (LazySetX)super.scanRight(identity, combiner); + + return (LazySetX) super.scanRight(identity, combiner); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#sorted(java. + * util.function.Function) */ @Override public > LazySetX sorted(Function function) { - - return (LazySetX)super.sorted(function); + + return (LazySetX) super.sorted(function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#plus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#plus(java.lang. + * Object) */ @Override public LazySetX plus(T e) { - - return (LazySetX)super.plus(e); + + return (LazySetX) super.plus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#plusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#plusAll(java. + * util.Collection) */ @Override public LazySetX plusAll(Collection list) { - - return (LazySetX)super.plusAll(list); + + return (LazySetX) super.plusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#minus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#minus(java.lang + * .Object) */ @Override public LazySetX minus(Object e) { - - return (LazySetX)super.minus(e); + + return (LazySetX) super.minus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#minusAll(java. + * util.Collection) */ @Override public LazySetX minusAll(Collection list) { - - return (LazySetX)super.minusAll(list); + + return (LazySetX) super.minusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#plusLazy(java. + * lang.Object) */ @Override public LazySetX plusLazy(T e) { - - return (LazySetX)super.plusLazy(e); + + return (LazySetX) super.plusLazy(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#plusAllLazy( + * java.util.Collection) */ @Override public LazySetX plusAllLazy(Collection list) { - - return (LazySetX)super.plusAllLazy(list); + + return (LazySetX) super.plusAllLazy(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#minusLazy(java. + * lang.Object) */ @Override public LazySetX minusLazy(Object e) { - - return (LazySetX)super.minusLazy(e); + + return (LazySetX) super.minusLazy(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#minusAllLazy( + * java.util.Collection) */ @Override public LazySetX minusAllLazy(Collection list) { - - return (LazySetX)super.minusAllLazy(list); + + return (LazySetX) super.minusAllLazy(list); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.SetX#cycle(int) */ @Override public LazyListX cycle(int times) { return LazyListX.fromPublisher(this.flux() - .repeat(times)); + .repeat(times)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#cycle(com.aol. + * cyclops.Monoid, int) */ @Override public LazyListX cycle(Monoid m, int times) { return LazyListX.fromPublisher(Fluxes.cycle(flux(), m, times)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#cycleWhile(java + * .util.function.Predicate) */ @Override public LazyListX cycleWhile(Predicate predicate) { - - return LazyListX.fromPublisher(Fluxes.cycleWhile(flux(),predicate)); + + return LazyListX.fromPublisher(Fluxes.cycleWhile(flux(), predicate)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#cycleUntil(java + * .util.function.Predicate) */ @Override public LazyListX cycleUntil(Predicate predicate) { - - return LazyListX.fromPublisher(Fluxes.cycleUntil(flux(),predicate)); + + return LazyListX.fromPublisher(Fluxes.cycleUntil(flux(), predicate)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#zip(org.jooq. + * lambda.Seq) */ @Override public LazySetX> zip(Seq other) { - - return (LazySetX)super.zip(other); + + return (LazySetX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#zip3(java.util. + * stream.Stream, java.util.stream.Stream) */ @Override public LazySetX> zip3(Stream second, Stream third) { - - return (LazySetX)super.zip3(second, third); + + return (LazySetX) super.zip3(second, third); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#zip4(java.util. + * stream.Stream, java.util.stream.Stream, java.util.stream.Stream) */ @Override public LazySetX> zip4(Stream second, Stream third, Stream fourth) { - - return (LazySetX)super.zip4(second, third, fourth); + + return (LazySetX) super.zip4(second, third, fourth); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#zipWithIndex() */ @Override public LazySetX> zipWithIndex() { - - return (LazySetX>)super.zipWithIndex(); + + return (LazySetX>) super.zipWithIndex(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.SetX#distinct() */ @Override public LazySetX distinct() { - - return (LazySetX)super.distinct(); + + return (LazySetX) super.distinct(); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.SetX#sorted() */ @Override public LazySetX sorted() { - - return (LazySetX)super.sorted(); + + return (LazySetX) super.sorted(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#sorted(java. + * util.Comparator) */ @Override public LazySetX sorted(Comparator c) { - - return (LazySetX)super.sorted(c); + + return (LazySetX) super.sorted(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#skipWhile(java. + * util.function.Predicate) */ @Override public LazySetX skipWhile(Predicate p) { - - return (LazySetX)super.skipWhile(p); + + return (LazySetX) super.skipWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#skipUntil(java. + * util.function.Predicate) */ @Override public LazySetX skipUntil(Predicate p) { - - return (LazySetX)super.skipUntil(p); + + return (LazySetX) super.skipUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#limitWhile(java + * .util.function.Predicate) */ @Override public LazySetX limitWhile(Predicate p) { - - return (LazySetX)super.limitWhile(p); + + return (LazySetX) super.limitWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#limitUntil(java + * .util.function.Predicate) */ @Override public LazySetX limitUntil(Predicate p) { - - return (LazySetX)super.limitUntil(p); + + return (LazySetX) super.limitUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#intersperse( + * java.lang.Object) */ @Override public LazySetX intersperse(T value) { - - return (LazySetX)super.intersperse(value); + + return (LazySetX) super.intersperse(value); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.SetX#shuffle() */ @Override public LazySetX shuffle() { - - return (LazySetX)super.shuffle(); + + return (LazySetX) super.shuffle(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#skipLast(int) */ @Override public LazySetX skipLast(int num) { - - return (LazySetX)super.skipLast(num); + + return (LazySetX) super.skipLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#limitLast(int) */ @Override public LazySetX limitLast(int num) { - - return (LazySetX)super.limitLast(num); + + return (LazySetX) super.limitLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#onEmpty(java. + * lang.Object) */ @Override public LazySetX onEmpty(T value) { - - return (LazySetX)super.onEmpty(value); + + return (LazySetX) super.onEmpty(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#onEmptyGet(java + * .util.function.Supplier) */ @Override public LazySetX onEmptyGet(Supplier supplier) { - - return (LazySetX)super.onEmptyGet(supplier); + + return (LazySetX) super.onEmptyGet(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#onEmptyThrow( + * java.util.function.Supplier) */ @Override public LazySetX onEmptyThrow(Supplier supplier) { - - return (LazySetX)super.onEmptyThrow(supplier); + + return (LazySetX) super.onEmptyThrow(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#shuffle(java. + * util.Random) */ @Override public LazySetX shuffle(Random random) { - - return (LazySetX)super.shuffle(random); + + return (LazySetX) super.shuffle(random); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#ofType(java. + * lang.Class) */ @Override public LazySetX ofType(Class type) { - - return (LazySetX)super.ofType(type); + + return (LazySetX) super.ofType(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#filterNot(java. + * util.function.Predicate) */ @Override public LazySetX filterNot(Predicate fn) { - - return (LazySetX)super.filterNot(fn); + + return (LazySetX) super.filterNot(fn); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.data.collections.extensions.standard.SetX#notNull() */ @Override public LazySetX notNull() { - - return (LazySetX)super.notNull(); + + return (LazySetX) super.notNull(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#removeAll(java. + * util.stream.Stream) */ @Override public LazySetX removeAll(Stream stream) { - - return (LazySetX)(super.removeAll(stream)); + + return (LazySetX) (super.removeAll(stream)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#removeAll(org. + * jooq.lambda.Seq) */ @Override public LazySetX removeAll(Seq stream) { - - return (LazySetX)super.removeAll(stream); + + return (LazySetX) super.removeAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#removeAll(java. + * lang.Iterable) */ @Override public LazySetX removeAll(Iterable it) { - - return (LazySetX)super.removeAll(it); + + return (LazySetX) super.removeAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#removeAll(java. + * lang.Object[]) */ @Override public LazySetX removeAll(T... values) { - - return (LazySetX)super.removeAll(values); + + return (LazySetX) super.removeAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#retainAll(java. + * lang.Iterable) */ @Override public LazySetX retainAll(Iterable it) { - - return (LazySetX)super.retainAll(it); + + return (LazySetX) super.retainAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#retainAll(java. + * util.stream.Stream) */ @Override public LazySetX retainAll(Stream stream) { - - return (LazySetX)super.retainAll(stream); + + return (LazySetX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#retainAll(org. + * jooq.lambda.Seq) */ @Override public LazySetX retainAll(Seq stream) { - - return (LazySetX)super.retainAll(stream); + + return (LazySetX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#retainAll(java. + * lang.Object[]) */ @Override public LazySetX retainAll(T... values) { - - return (LazySetX)super.retainAll(values); + + return (LazySetX) super.retainAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#cast(java.lang. + * Class) */ @Override public LazySetX cast(Class type) { - - return (LazySetX)super.cast(type); + + return (LazySetX) super.cast(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#patternMatch( + * java.util.function.Function, java.util.function.Supplier) */ @Override public LazySetX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazySetX)super.patternMatch(case1, otherwise); + + return (LazySetX) super.patternMatch(case1, otherwise); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#permutations() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#permutations() */ @Override public LazySetX> permutations() { - - return (LazySetX>)super.permutations(); + + return (LazySetX>) super.permutations(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#combinations(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#combinations( + * int) */ @Override public LazySetX> combinations(int size) { - - return (LazySetX>)super.combinations(size); + + return (LazySetX>) super.combinations(size); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#combinations() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#combinations() */ @Override public LazySetX> combinations() { - - return (LazySetX>)super.combinations(); + + return (LazySetX>) super.combinations(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#grouped(int, + * java.util.function.Supplier) */ @Override public > LazySetX grouped(int size, Supplier supplier) { - - return (LazySetX)super.grouped(size, supplier); + + return (LazySetX) super.grouped(size, supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#groupedUntil( + * java.util.function.Predicate) */ @Override public LazySetX> groupedUntil(Predicate predicate) { - - return (LazySetX>)super.groupedUntil(predicate); + + return (LazySetX>) super.groupedUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#groupedWhile( + * java.util.function.Predicate) */ @Override public LazySetX> groupedWhile(Predicate predicate) { - - return (LazySetX>)super.groupedWhile(predicate); + + return (LazySetX>) super.groupedWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#groupedWhile( + * java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazySetX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazySetX)super.groupedWhile(predicate, factory); + + return (LazySetX) super.groupedWhile(predicate, factory); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#groupedUntil( + * java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazySetX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazySetX)super.groupedUntil(predicate, factory); + + return (LazySetX) super.groupedUntil(predicate, factory); } - + /** SetX methods **/ - /* Makes a defensive copy of this SetX replacing the value at i with the specified element - * (non-Javadoc) - * @see com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with(int, java.lang.Object) + /* + * Makes a defensive copy of this SetX replacing the value at i with the + * specified element (non-Javadoc) + * + * @see + * com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with( + * int, java.lang.Object) */ - public LazySetX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazySetX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#unit(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #unit(java.util.Collection) */ @Override - public LazySetX unit(Collection col){ + public LazySetX unit(Collection col) { return LazySetX.fromIterable(col); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Unit#unit(java.lang.Object) */ @Override - public LazySetX unit(R value){ + public LazySetX unit(R value) { return LazySetX.singleton(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#unitIterator(java.util.Iterator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#unitIterator(java.util.Iterator) */ @Override - public LazySetX unitIterator(Iterator it){ - return LazySetX.fromIterable(()->it); + public LazySetX unitIterator(Iterator it) { + return LazySetX.fromIterable(() -> it); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazySetX plusInOrder(T e) { - - return (LazySetX)super.plusInOrder(e); + + return (LazySetX) super.plusInOrder(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazySetX from(Collection c) { - if(c instanceof List) - return new LazySetX((Set)c,(Collector)collector); - return new LazySetX((Set)c.stream().collect(SetX.defaultCollector()),(Collector)this.collector); + if (c instanceof List) + return new LazySetX( + (Set) c, (Collector) collector); + return new LazySetX( + (Set) c.stream() + .collect(SetX.defaultCollector()), + (Collector) this.collector); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazySetX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazySetX>)super.groupedStatefullyUntil(predicate); + + return (LazySetX>) super.groupedStatefullyUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazySetX peek(Consumer c) { - - return (LazySetX)super.peek(c); + + return (LazySetX) super.peek(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazySetX zip(Seq other, - BiFunction zipper) { - - return (LazySetX)super.zip(other, zipper); + public LazySetX zip(Seq other, BiFunction zipper) { + + return (LazySetX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public LazySetX zip(Stream other, - BiFunction zipper) { - - return (LazySetX)super.zip(other, zipper); + public LazySetX zip(Stream other, BiFunction zipper) { + + return (LazySetX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazySetX> zip(Stream other) { - - return (LazySetX)super.zip(other); + + return (LazySetX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazySetX zip(BiFunction fn, Publisher publisher) { - - return (LazySetX)super.zip(fn, publisher); + + return (LazySetX) super.zip(fn, publisher); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#fromStream(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#fromStream(java + * .util.stream.Stream) */ @Override public LazySetX fromStream(Stream stream) { - Set list = (Set) stream.collect((Collector)getCollector()); - return new LazySetX(list, (Collector)getCollector()); + Set list = (Set) stream.collect((Collector) getCollector()); + return new LazySetX( + list, (Collector) getCollector()); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SetX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SetX#onEmptySwitch( + * java.util.function.Supplier) */ @Override public LazySetX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); } - - - - + } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazySortedSetX.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazySortedSetX.java index fc6925ec..f2fcb6cd 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazySortedSetX.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/collections/extensions/standard/LazySortedSetX.java @@ -74,21 +74,22 @@ * * @param the type of elements held in this collection */ -public class LazySortedSetX extends AbstractFluentCollectionX implements SortedSetX { - private final LazyFluentCollection> lazy; +public class LazySortedSetX extends AbstractFluentCollectionXimplements SortedSetX { + private final LazyFluentCollection> lazy; @Getter - private final Collector> collector; - - + private final Collector> collector; + /** * Create a LazySortedSetX from a Stream * * @param stream to construct a LazySortedSetX from * @return LazySortedSetX */ - public static LazySortedSetX fromStreamS(Stream stream){ - return new LazySortedSetX(Flux.from(ReactiveSeq.fromStream(stream))); + public static LazySortedSetX fromStreamS(Stream stream) { + return new LazySortedSetX( + Flux.from(ReactiveSeq.fromStream(stream))); } + /** * Create a LazySortedSetX that contains the Integers between start and end * @@ -144,7 +145,7 @@ public static LazySortedSetX unfold(U seed, Function LazySortedSetX generate(long limit, Supplier s) { return fromStreamS(ReactiveSeq.generate(s) - .limit(limit)); + .limit(limit)); } /** @@ -157,10 +158,9 @@ public static LazySortedSetX generate(long limit, Supplier s) { */ public static LazySortedSetX iterate(long limit, final T seed, final UnaryOperator f) { return fromStreamS(ReactiveSeq.iterate(seed, f) - .limit(limit)); + .limit(limit)); } - /** * @return A collector that generates a LazySortedSetX */ @@ -168,14 +168,13 @@ public static LazySortedSetX iterate(long limit, final T seed, final Unar return Collectors.toCollection(() -> LazySortedSetX.of()); } - - /** * @return An empty LazySortedSetX */ public static LazySortedSetX empty() { - return fromIterable((List) ListX.defaultCollector().supplier() - .get()); + return fromIterable((List) ListX. defaultCollector() + .supplier() + .get()); } /** @@ -196,8 +195,9 @@ public static LazySortedSetX empty() { */ @SafeVarargs public static LazySortedSetX of(T... values) { - List res = (List) ListX.defaultCollector().supplier() - .get(); + List res = (List) ListX. defaultCollector() + .supplier() + .get(); for (T v : values) res.add(v); return fromIterable(res); @@ -238,7 +238,7 @@ public static LazySortedSetX fromPublisher(Publisher publish * @return LazySortedSetX from Iterable */ public static LazySortedSetX fromIterable(Iterable it) { - return fromIterable(SortedSetX.defaultCollector(), it); + return fromIterable(SortedSetX. defaultCollector(), it); } /** @@ -251,39 +251,51 @@ public static LazySortedSetX fromIterable(Iterable it) { public static LazySortedSetX fromIterable(Collector> collector, Iterable it) { if (it instanceof LazySortedSetX) return (LazySortedSetX) it; - + if (it instanceof SortedSet) return new LazySortedSetX( - (SortedSet) it, collector); + (SortedSet) it, collector); return new LazySortedSetX( - Flux.fromIterable(it), - collector); + Flux.fromIterable(it), collector); } - private LazySortedSetX(SortedSet list,Collector> collector){ - this.lazy = new LazyCollection<>(list,null,collector); - this.collector= collector; + + private LazySortedSetX(SortedSet list, Collector> collector) { + this.lazy = new LazyCollection<>( + list, null, collector); + this.collector = collector; } - - private LazySortedSetX(SortedSet list){ + + private LazySortedSetX(SortedSet list) { this.collector = SortedSetX.defaultCollector(); - this.lazy = new LazyCollection>(list,null,collector); + this.lazy = new LazyCollection>( + list, null, collector); } - private LazySortedSetX(Flux stream,Collector> collector){ - + + private LazySortedSetX(Flux stream, Collector> collector) { + this.collector = collector; - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazySortedSetX(Flux stream){ - + + private LazySortedSetX(Flux stream) { + this.collector = SortedSetX.defaultCollector(); - this.lazy = new LazyCollection<>(null,stream,collector); + this.lazy = new LazyCollection<>( + null, stream, collector); } - private LazySortedSetX(){ + + private LazySortedSetX() { this.collector = SortedSetX.defaultCollector(); - this.lazy = new LazyCollection<>((SortedSet)this.collector.supplier().get(),null,collector); + this.lazy = new LazyCollection<>( + (SortedSet) this.collector.supplier() + .get(), + null, collector); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#forEach(java.util.function.Consumer) */ @Override @@ -291,7 +303,9 @@ public void forEach(Consumer action) { getSortedSet().forEach(action); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Iterable#iterator() */ @Override @@ -299,7 +313,9 @@ public Iterator iterator() { return getSortedSet().iterator(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#size() */ @Override @@ -307,7 +323,9 @@ public int size() { return getSortedSet().size(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#contains(java.lang.Object) */ @Override @@ -315,7 +333,9 @@ public boolean contains(Object e) { return getSortedSet().contains(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override @@ -323,9 +343,9 @@ public boolean equals(Object o) { return getSortedSet().equals(o); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#isEmpty() */ @Override @@ -333,7 +353,9 @@ public boolean isEmpty() { return getSortedSet().isEmpty(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -341,7 +363,9 @@ public int hashCode() { return getSortedSet().hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray() */ @Override @@ -349,7 +373,9 @@ public Object[] toArray() { return getSortedSet().toArray(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#removeAll(java.util.Collection) */ @Override @@ -357,7 +383,9 @@ public boolean removeAll(Collection c) { return getSortedSet().removeAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#toArray(java.lang.Object[]) */ @Override @@ -365,7 +393,9 @@ public T[] toArray(T[] a) { return getSortedSet().toArray(a); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#add(java.lang.Object) */ @Override @@ -373,7 +403,9 @@ public boolean add(T e) { return getSortedSet().add(e); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#remove(java.lang.Object) */ @Override @@ -381,7 +413,9 @@ public boolean remove(Object o) { return getSortedSet().remove(o); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#containsAll(java.util.Collection) */ @Override @@ -389,7 +423,9 @@ public boolean containsAll(Collection c) { return getSortedSet().containsAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#addAll(java.util.Collection) */ @Override @@ -397,7 +433,9 @@ public boolean addAll(Collection c) { return getSortedSet().addAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#retainAll(java.util.Collection) */ @Override @@ -405,7 +443,9 @@ public boolean retainAll(Collection c) { return getSortedSet().retainAll(c); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.Collection#clear() */ @Override @@ -413,8 +453,9 @@ public void clear() { getSortedSet().clear(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -422,7 +463,9 @@ public String toString() { return getSortedSet().toString(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#collect(java.util.stream.Collector) */ @Override @@ -430,786 +473,1207 @@ public R collect(Collector collector) { return stream().collect(collector); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.jooq.lambda.Collectable#count() */ @Override public long count() { return this.size(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#removeIf(java.util.function.Predicate) */ @Override - public boolean removeIf(Predicate filter) { + public boolean removeIf(Predicate filter) { return getSortedSet().removeIf(filter); } - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.util.Collection#parallelStream() */ @Override - public Stream parallelStream() { + public Stream parallelStream() { return getSortedSet().parallelStream(); } - - - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Iterable#spliterator() */ @Override public Spliterator spliterator() { return getSortedSet().spliterator(); } - + private SortedSet getSortedSet() { return lazy.get(); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#stream(reactor.core.publisher.Flux) */ @Override - public LazySortedSetX stream(Flux stream){ - return new LazySortedSetX(stream); + public LazySortedSetX stream(Flux stream) { + return new LazySortedSetX( + stream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.persistent.PBagX#stream() */ @Override public ReactiveSeq stream() { - return ReactiveSeq.fromStream(lazy.get().stream()); + return ReactiveSeq.fromStream(lazy.get() + .stream()); } + @Override public Flux flux() { return lazy.flux(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#combine( + * java.util.function.BiPredicate, java.util.function.BinaryOperator) */ @Override public LazySortedSetX combine(BiPredicate predicate, BinaryOperator op) { - - return (LazySortedSetX)super.combine(predicate, op); + + return (LazySortedSetX) super.combine(predicate, op); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#reverse() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#reverse() */ @Override public LazySortedSetX reverse() { - - return(LazySortedSetX)super.reverse(); + + return (LazySortedSetX) super.reverse(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#filter(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#filter( + * java.util.function.Predicate) */ @Override public LazySortedSetX filter(Predicate pred) { - - return (LazySortedSetX)super.filter(pred); + + return (LazySortedSetX) super.filter(pred); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#map(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#map(java. + * util.function.Function) */ @Override public LazySortedSetX map(Function mapper) { - - return (LazySortedSetX)super.map(mapper); + + return (LazySortedSetX) super.map(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#flatMap(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#flatMap( + * java.util.function.Function) */ @Override public LazySortedSetX flatMap(Function> mapper) { - return (LazySortedSetX)super.flatMap(mapper); + return (LazySortedSetX) super.flatMap(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#limit(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#limit( + * long) */ @Override public LazySortedSetX limit(long num) { - return (LazySortedSetX)super.limit(num); + return (LazySortedSetX) super.limit(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#skip(long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#skip( + * long) */ @Override public LazySortedSetX skip(long num) { - return (LazySortedSetX)super.skip(num); + return (LazySortedSetX) super.skip(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#takeRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#takeRight + * (int) */ @Override public LazySortedSetX takeRight(int num) { - return (LazySortedSetX)super.takeRight(num); + return (LazySortedSetX) super.takeRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#dropRight(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#dropRight + * (int) */ @Override public LazySortedSetX dropRight(int num) { - return (LazySortedSetX)super.dropRight(num); + return (LazySortedSetX) super.dropRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#takeWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#takeWhile + * (java.util.function.Predicate) */ @Override public LazySortedSetX takeWhile(Predicate p) { - return (LazySortedSetX)super.takeWhile(p); + return (LazySortedSetX) super.takeWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#dropWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#dropWhile + * (java.util.function.Predicate) */ @Override public LazySortedSetX dropWhile(Predicate p) { - return (LazySortedSetX)super.dropWhile(p); + return (LazySortedSetX) super.dropWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#takeUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#takeUntil + * (java.util.function.Predicate) */ @Override public LazySortedSetX takeUntil(Predicate p) { - return (LazySortedSetX)super.takeUntil(p); + return (LazySortedSetX) super.takeUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#dropUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#dropUntil + * (java.util.function.Predicate) */ @Override public LazySortedSetX dropUntil(Predicate p) { - return(LazySortedSetX)super.dropUntil(p); + return (LazySortedSetX) super.dropUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#trampoline(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * trampoline(java.util.function.Function) */ @Override public LazySortedSetX trampoline(Function> mapper) { - return (LazySortedSetX)super.trampoline(mapper); + return (LazySortedSetX) super.trampoline(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#slice(long, long) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#slice( + * long, long) */ @Override public LazySortedSetX slice(long from, long to) { - return (LazySortedSetX)super.slice(from, to); + return (LazySortedSetX) super.slice(from, to); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#grouped(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#grouped( + * int) */ @Override public LazySortedSetX> grouped(int groupSize) { - - return (LazySortedSetX>)super.grouped(groupSize); + + return (LazySortedSetX>) super.grouped(groupSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#grouped(java.util.function.Function, java.util.stream.Collector) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#grouped( + * java.util.function.Function, java.util.stream.Collector) */ @Override public LazySortedSetX> grouped(Function classifier, Collector downstream) { - - return (LazySortedSetX)super.grouped(classifier, downstream); + + return (LazySortedSetX) super.grouped(classifier, downstream); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip(java. + * lang.Iterable) */ @Override public LazySortedSetX> zip(Iterable other) { - - return (LazySortedSetX)super.zip(other); + + return (LazySortedSetX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip(java.lang.Iterable, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip(java. + * lang.Iterable, java.util.function.BiFunction) */ @Override - public LazySortedSetX zip(Iterable other, BiFunction zipper) { - - return (LazySortedSetX)super.zip(other, zipper); + public LazySortedSetX zip(Iterable other, + BiFunction zipper) { + + return (LazySortedSetX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sliding(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sliding( + * int) */ @Override public LazySortedSetX> sliding(int windowSize) { - - return (LazySortedSetX>)super.sliding(windowSize); + + return (LazySortedSetX>) super.sliding(windowSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sliding(int, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sliding( + * int, int) */ @Override public LazySortedSetX> sliding(int windowSize, int increment) { - - return (LazySortedSetX>)super.sliding(windowSize, increment); + + return (LazySortedSetX>) super.sliding(windowSize, increment); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#scanLeft(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#scanLeft( + * com.aol.cyclops.Monoid) */ @Override public LazySortedSetX scanLeft(Monoid monoid) { - - return (LazySortedSetX)super.scanLeft(monoid); + + return (LazySortedSetX) super.scanLeft(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#scanLeft(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#scanLeft( + * java.lang.Object, java.util.function.BiFunction) */ @Override public LazySortedSetX scanLeft(U seed, BiFunction function) { - + return (LazySortedSetX) super.scanLeft(seed, function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#scanRight(com.aol.cyclops.Monoid) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#scanRight + * (com.aol.cyclops.Monoid) */ @Override public LazySortedSetX scanRight(Monoid monoid) { - - return (LazySortedSetX)super.scanRight(monoid); + + return (LazySortedSetX) super.scanRight(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#scanRight(java.lang.Object, java.util.function.BiFunction) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#scanRight + * (java.lang.Object, java.util.function.BiFunction) */ @Override public LazySortedSetX scanRight(U identity, BiFunction combiner) { - - return (LazySortedSetX)super.scanRight(identity, combiner); + + return (LazySortedSetX) super.scanRight(identity, combiner); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sorted(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sorted( + * java.util.function.Function) */ @Override public > LazySortedSetX sorted(Function function) { - - return (LazySortedSetX)super.sorted(function); + + return (LazySortedSetX) super.sorted(function); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#plus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#plus(java + * .lang.Object) */ @Override public LazySortedSetX plus(T e) { - - return (LazySortedSetX)super.plus(e); + + return (LazySortedSetX) super.plus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#plusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#plusAll( + * java.util.Collection) */ @Override public LazySortedSetX plusAll(Collection list) { - - return (LazySortedSetX)super.plusAll(list); + + return (LazySortedSetX) super.plusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#minus(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#minus( + * java.lang.Object) */ @Override public LazySortedSetX minus(Object e) { - - return (LazySortedSetX)super.minus(e); + + return (LazySortedSetX) super.minus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#minusAll(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#minusAll( + * java.util.Collection) */ @Override public LazySortedSetX minusAll(Collection list) { - - return (LazySortedSetX)super.minusAll(list); + + return (LazySortedSetX) super.minusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#plusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#plusLazy( + * java.lang.Object) */ @Override public LazySortedSetX plusLazy(T e) { - - return (LazySortedSetX)super.plus(e); + + return (LazySortedSetX) super.plus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#plusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * plusAllLazy(java.util.Collection) */ @Override public LazySortedSetX plusAllLazy(Collection list) { - - return (LazySortedSetX)super.plusAll(list); + + return (LazySortedSetX) super.plusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#minusLazy(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#minusLazy + * (java.lang.Object) */ @Override public LazySortedSetX minusLazy(Object e) { - - return (LazySortedSetX)super.minus(e); + + return (LazySortedSetX) super.minus(e); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#minusAllLazy(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * minusAllLazy(java.util.Collection) */ @Override public LazySortedSetX minusAllLazy(Collection list) { - - return (LazySortedSetX)super.minusAll(list); + + return (LazySortedSetX) super.minusAll(list); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#cycle(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#cycle( + * int) */ @Override public LazyListX cycle(int times) { return LazyListX.fromPublisher(this.flux() - .repeat(times)); + .repeat(times)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#cycle(com.aol.cyclops.Monoid, int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#cycle(com + * .aol.cyclops.Monoid, int) */ @Override public LazyListX cycle(Monoid m, int times) { return LazyListX.fromPublisher(Fluxes.cycle(flux(), m, times)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#cycleWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * cycleWhile(java.util.function.Predicate) */ @Override public LazyListX cycleWhile(Predicate predicate) { - - return LazyListX.fromPublisher(Fluxes.cycleWhile(flux(),predicate)); + + return LazyListX.fromPublisher(Fluxes.cycleWhile(flux(), predicate)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#cycleUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * cycleUntil(java.util.function.Predicate) */ @Override public LazyListX cycleUntil(Predicate predicate) { - - return LazyListX.fromPublisher(Fluxes.cycleUntil(flux(),predicate)); + + return LazyListX.fromPublisher(Fluxes.cycleUntil(flux(), predicate)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip(org. + * jooq.lambda.Seq) */ @Override public LazySortedSetX> zip(Seq other) { - - return (LazySortedSetX)super.zip(other); + + return (LazySortedSetX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip3(java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip3(java + * .util.stream.Stream, java.util.stream.Stream) */ @Override public LazySortedSetX> zip3(Stream second, Stream third) { - - return (LazySortedSetX)super.zip3(second, third); + + return (LazySortedSetX) super.zip3(second, third); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zip4(java + * .util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) */ @Override - public LazySortedSetX> zip4(Stream second, Stream third, - Stream fourth) { - - return (LazySortedSetX)super.zip4(second, third, fourth); + public LazySortedSetX> zip4(Stream second, + Stream third, Stream fourth) { + + return (LazySortedSetX) super.zip4(second, third, fourth); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#zipWithIndex() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * zipWithIndex() */ @Override public LazySortedSetX> zipWithIndex() { - - return (LazySortedSetX>)super.zipWithIndex(); + + return (LazySortedSetX>) super.zipWithIndex(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#distinct() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#distinct( + * ) */ @Override public LazySortedSetX distinct() { - - return (LazySortedSetX)super.distinct(); + + return (LazySortedSetX) super.distinct(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sorted() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sorted() */ @Override public LazySortedSetX sorted() { - - return (LazySortedSetX)super.sorted(); + + return (LazySortedSetX) super.sorted(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sorted(java.util.Comparator) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#sorted( + * java.util.Comparator) */ @Override public LazySortedSetX sorted(Comparator c) { - - return (LazySortedSetX)super.sorted(c); + + return (LazySortedSetX) super.sorted(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#skipWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#skipWhile + * (java.util.function.Predicate) */ @Override public LazySortedSetX skipWhile(Predicate p) { - - return (LazySortedSetX)super.skipWhile(p); + + return (LazySortedSetX) super.skipWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#skipUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#skipUntil + * (java.util.function.Predicate) */ @Override public LazySortedSetX skipUntil(Predicate p) { - - return (LazySortedSetX)super.skipUntil(p); + + return (LazySortedSetX) super.skipUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#limitWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * limitWhile(java.util.function.Predicate) */ @Override public LazySortedSetX limitWhile(Predicate p) { - - return (LazySortedSetX)super.limitWhile(p); + + return (LazySortedSetX) super.limitWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#limitUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * limitUntil(java.util.function.Predicate) */ @Override public LazySortedSetX limitUntil(Predicate p) { - - return (LazySortedSetX)super.limitUntil(p); + + return (LazySortedSetX) super.limitUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#intersperse(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * intersperse(java.lang.Object) */ @Override public LazySortedSetX intersperse(T value) { - - return (LazySortedSetX)super.intersperse(value); + + return (LazySortedSetX) super.intersperse(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#shuffle() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#shuffle() */ @Override public LazySortedSetX shuffle() { - - return (LazySortedSetX)super.shuffle(); + + return (LazySortedSetX) super.shuffle(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#skipLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#skipLast( + * int) */ @Override public LazySortedSetX skipLast(int num) { - - return (LazySortedSetX)super.skipLast(num); + + return (LazySortedSetX) super.skipLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#limitLast(int) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#limitLast + * (int) */ @Override public LazySortedSetX limitLast(int num) { - - return (LazySortedSetX)super.limitLast(num); + + return (LazySortedSetX) super.limitLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#onEmpty(java.lang.Object) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#onEmpty( + * java.lang.Object) */ @Override public LazySortedSetX onEmpty(T value) { - - return (LazySortedSetX)super.onEmpty(value); + + return (LazySortedSetX) super.onEmpty(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#onEmptyGet(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * onEmptyGet(java.util.function.Supplier) */ @Override public LazySortedSetX onEmptyGet(Supplier supplier) { - - return (LazySortedSetX)super.onEmptyGet(supplier); + + return (LazySortedSetX) super.onEmptyGet(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#onEmptyThrow(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * onEmptyThrow(java.util.function.Supplier) */ @Override public LazySortedSetX onEmptyThrow(Supplier supplier) { - - return (LazySortedSetX)super.onEmptyThrow(supplier); + + return (LazySortedSetX) super.onEmptyThrow(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#shuffle(java.util.Random) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#shuffle( + * java.util.Random) */ @Override public LazySortedSetX shuffle(Random random) { - - return (LazySortedSetX)super.shuffle(random); + + return (LazySortedSetX) super.shuffle(random); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#ofType(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#ofType( + * java.lang.Class) */ @Override public LazySortedSetX ofType(Class type) { - - return (LazySortedSetX)super.ofType(type); + + return (LazySortedSetX) super.ofType(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#filterNot(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#filterNot + * (java.util.function.Predicate) */ @Override public LazySortedSetX filterNot(Predicate fn) { - - return (LazySortedSetX)super.filterNot(fn); + + return (LazySortedSetX) super.filterNot(fn); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#notNull() + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#notNull() */ @Override public LazySortedSetX notNull() { - - return (LazySortedSetX)super.notNull(); + + return (LazySortedSetX) super.notNull(); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#removeAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#removeAll + * (java.util.stream.Stream) */ @Override public LazySortedSetX removeAll(Stream stream) { - - return (LazySortedSetX)(super.removeAll(stream)); + + return (LazySortedSetX) (super.removeAll(stream)); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#removeAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#removeAll + * (org.jooq.lambda.Seq) */ @Override public LazySortedSetX removeAll(Seq stream) { - - return (LazySortedSetX)super.removeAll(stream); + + return (LazySortedSetX) super.removeAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#removeAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#removeAll + * (java.lang.Iterable) */ @Override public LazySortedSetX removeAll(Iterable it) { - - return (LazySortedSetX)super.removeAll(it); + + return (LazySortedSetX) super.removeAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#removeAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#removeAll + * (java.lang.Object[]) */ @Override public LazySortedSetX removeAll(T... values) { - - return (LazySortedSetX)super.removeAll(values); + + return (LazySortedSetX) super.removeAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#retainAll(java.lang.Iterable) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#retainAll + * (java.lang.Iterable) */ @Override public LazySortedSetX retainAll(Iterable it) { - - return (LazySortedSetX)super.retainAll(it); + + return (LazySortedSetX) super.retainAll(it); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#retainAll(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#retainAll + * (java.util.stream.Stream) */ @Override public LazySortedSetX retainAll(Stream stream) { - - return (LazySortedSetX)super.retainAll(stream); + + return (LazySortedSetX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#retainAll(org.jooq.lambda.Seq) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#retainAll + * (org.jooq.lambda.Seq) */ @Override public LazySortedSetX retainAll(Seq stream) { - - return (LazySortedSetX)super.retainAll(stream); + + return (LazySortedSetX) super.retainAll(stream); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#retainAll(java.lang.Object[]) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#retainAll + * (java.lang.Object[]) */ @Override public LazySortedSetX retainAll(T... values) { - - return (LazySortedSetX)super.retainAll(values); + + return (LazySortedSetX) super.retainAll(values); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#cast(java.lang.Class) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#cast(java + * .lang.Class) */ @Override public LazySortedSetX cast(Class type) { - - return (LazySortedSetX)super.cast(type); + + return (LazySortedSetX) super.cast(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#patternMatch(java.util.function.Function, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * patternMatch(java.util.function.Function, java.util.function.Supplier) */ @Override public LazySortedSetX patternMatch(Function, CheckValue1> case1, Supplier otherwise) { - - return (LazySortedSetX)super.patternMatch(case1, otherwise); + + return (LazySortedSetX) super.patternMatch(case1, otherwise); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#grouped(int, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.data.collections.extensions.standard.SortedSetX#grouped( + * int, java.util.function.Supplier) */ @Override public > LazySortedSetX grouped(int size, Supplier supplier) { - - return (LazySortedSetX)super.grouped(size, supplier); + + return (LazySortedSetX) super.grouped(size, supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#groupedUntil(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * groupedUntil(java.util.function.Predicate) */ @Override public LazySortedSetX> groupedUntil(Predicate predicate) { - - return (LazySortedSetX>)super.groupedUntil(predicate); + + return (LazySortedSetX>) super.groupedUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#groupedWhile(java.util.function.Predicate) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * groupedWhile(java.util.function.Predicate) */ @Override public LazySortedSetX> groupedWhile(Predicate predicate) { - - return (LazySortedSetX>)super.groupedWhile(predicate); + + return (LazySortedSetX>) super.groupedWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * groupedWhile(java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazySortedSetX groupedWhile(Predicate predicate, Supplier factory) { - - return (LazySortedSetX)super.groupedWhile(predicate, factory); + + return (LazySortedSetX) super.groupedWhile(predicate, factory); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * groupedUntil(java.util.function.Predicate, java.util.function.Supplier) */ @Override public > LazySortedSetX groupedUntil(Predicate predicate, Supplier factory) { - - return (LazySortedSetX)super.groupedUntil(predicate, factory); + + return (LazySortedSetX) super.groupedUntil(predicate, factory); } - + /** SortedSetX methods **/ - /* Makes a defensive copy of this SortedSetX replacing the value at i with the specified element - * (non-Javadoc) - * @see com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with(int, java.lang.Object) + /* + * Makes a defensive copy of this SortedSetX replacing the value at i with + * the specified element (non-Javadoc) + * + * @see + * com.aol.cyclops.collections.extensions.standard.MutableSequenceX#with( + * int, java.lang.Object) */ - public LazySortedSetX with(int i,T element){ - return stream( Fluxes.insertAt(Fluxes.deleteBetween(flux(),i, i+1),i,element)) ; + public LazySortedSetX with(int i, T element) { + return stream(Fluxes.insertAt(Fluxes.deleteBetween(flux(), i, i + 1), i, element)); } - - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#unit(java.util.Collection) + + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #unit(java.util.Collection) */ @Override - public LazySortedSetX unit(Collection col){ + public LazySortedSetX unit(Collection col) { return LazySortedSetX.fromIterable(col); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Unit#unit(java.lang.Object) */ @Override - public LazySortedSetX unit(R value){ + public LazySortedSetX unit(R value) { return LazySortedSetX.singleton(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#unitIterator(java.util.Iterator) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#unitIterator(java.util.Iterator) */ @Override - public LazySortedSetX unitIterator(Iterator it){ - return LazySortedSetX.fromIterable(()->it); + public LazySortedSetX unitIterator(Iterator it) { + return LazySortedSetX.fromIterable(() -> it); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX#plusInOrder(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.collections.extensions.base.LazyFluentCollectionX + * #plusInOrder(java.lang.Object) */ @Override public LazySortedSetX plusInOrder(T e) { - - return (LazySortedSetX)super.plusInOrder(e); + + return (LazySortedSetX) super.plusInOrder(e); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#from(java.util.Collection) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#from(java.util.Collection) */ @Override public LazySortedSetX from(Collection c) { - if(c instanceof List) - return new LazySortedSetX((SortedSet)c,(Collector)collector); - return new LazySortedSetX((SortedSet)c.stream().collect(SortedSetX.defaultCollector()),(Collector)this.collector); + if (c instanceof List) + return new LazySortedSetX( + (SortedSet) c, (Collector) collector); + return new LazySortedSetX( + (SortedSet) c.stream() + .collect(SortedSetX.defaultCollector()), + (Collector) this.collector); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#groupedStatefullyUntil(java.util.function. + * BiPredicate) */ @Override public LazySortedSetX> groupedStatefullyUntil(BiPredicate, ? super T> predicate) { - - return (LazySortedSetX>)super.groupedStatefullyUntil(predicate); + + return (LazySortedSetX>) super.groupedStatefullyUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#peek(java.util.function.Consumer) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#peek(java.util.function.Consumer) */ @Override public LazySortedSetX peek(Consumer c) { - - return (LazySortedSetX)super.peek(c); + + return (LazySortedSetX) super.peek(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public LazySortedSetX zip(Seq other, - BiFunction zipper) { - - return (LazySortedSetX)super.zip(other, zipper); + public LazySortedSetX zip(Seq other, BiFunction zipper) { + + return (LazySortedSetX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override public LazySortedSetX zip(Stream other, BiFunction zipper) { - - return (LazySortedSetX)super.zip(other, zipper); + + return (LazySortedSetX) super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.stream.Stream) */ @Override public LazySortedSetX> zip(Stream other) { - - return (LazySortedSetX)super.zip(other); + + return (LazySortedSetX) super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#zip(java.util.function.BiFunction, org.reactivestreams.Publisher) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#zip(java.util.function.BiFunction, + * org.reactivestreams.Publisher) */ @Override public LazySortedSetX zip(BiFunction fn, Publisher publisher) { - - return (LazySortedSetX)super.zip(fn, publisher); + + return (LazySortedSetX) super.zip(fn, publisher); } - - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#fromStream(java.util.stream.Stream) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * fromStream(java.util.stream.Stream) */ @Override public LazySortedSetX fromStream(Stream stream) { - SortedSet list = (SortedSet) stream.collect((Collector)getCollector()); - return new LazySortedSetX(list, (Collector)getCollector()); + SortedSet list = (SortedSet) stream.collect((Collector) getCollector()); + return new LazySortedSetX( + list, (Collector) getCollector()); } - /* (non-Javadoc) - * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX#onEmptySwitch(java.util.function.Supplier) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.data.collections.extensions.standard.SortedSetX# + * onEmptySwitch(java.util.function.Supplier) */ @Override public LazySortedSetX onEmptySwitch(Supplier> supplier) { - return stream(Fluxes.onEmptySwitch(flux(), ()->Flux.fromIterable(supplier.get()))); + return stream(Fluxes.onEmptySwitch(flux(), () -> Flux.fromIterable(supplier.get()))); } - + /** * @return * @see java.util.SortedSet#comparator() @@ -1217,6 +1681,7 @@ public LazySortedSetX onEmptySwitch(Supplier> supplier public Comparator comparator() { return getSortedSet().comparator(); } + /** * @param fromElement * @param toElement @@ -1224,24 +1689,30 @@ public Comparator comparator() { * @see java.util.SortedSet#subSet(java.lang.Object, java.lang.Object) */ public SortedSetX subSet(T fromElement, T toElement) { - return new LazySortedSetX<>(getSortedSet().subSet(fromElement, toElement),this.collector); + return new LazySortedSetX<>( + getSortedSet().subSet(fromElement, toElement), this.collector); } + /** * @param toElement * @return * @see java.util.SortedSet#headSet(java.lang.Object) */ public SortedSetX headSet(T toElement) { - return new LazySortedSetX<>(getSortedSet().headSet(toElement),this.collector); + return new LazySortedSetX<>( + getSortedSet().headSet(toElement), this.collector); } + /** * @param fromElement * @return * @see java.util.SortedSet#tailSet(java.lang.Object) */ public SortedSet tailSet(T fromElement) { - return new LazySortedSetX<>(getSortedSet().tailSet(fromElement),this.collector); + return new LazySortedSetX<>( + getSortedSet().tailSet(fromElement), this.collector); } + /** * @return * @see java.util.SortedSet#first() @@ -1249,6 +1720,7 @@ public SortedSet tailSet(T fromElement) { public T first() { return getSortedSet().first(); } + /** * @return * @see java.util.SortedSet#last() @@ -1256,36 +1728,56 @@ public T first() { public T last() { return getSortedSet().last(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#permutations() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#permutations() */ @Override public LazySortedSetX> permutations() { - return stream(Flux.from(Streamable.fromPublisher(flux()).permutations().map(s->s.stream())).map(Comparables::comparable)); + return stream(Flux.from(Streamable.fromPublisher(flux()) + .permutations() + .map(s -> s.stream())) + .map(Comparables::comparable)); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations(int) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations(int) */ @Override public SortedSetX> combinations(int size) { - return stream(Flux.from(Streamable.fromPublisher(flux()).combinations(size).map(s->s.stream())).map(Comparables::comparable)); - + return stream(Flux.from(Streamable.fromPublisher(flux()) + .combinations(size) + .map(s -> s.stream())) + .map(Comparables::comparable)); + } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#combinations() + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#combinations() */ @Override - public SortedSetX> combinations() { - return stream(Flux.from(Streamable.fromPublisher(flux()).combinations().map(s->s.stream())).map(Comparables::comparable)); + public SortedSetX> combinations() { + return stream(Flux.from(Streamable.fromPublisher(flux()) + .combinations() + .map(s -> s.stream())) + .map(Comparables::comparable)); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.collections.extensions.base.AbstractFluentCollectionX#grouped(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.collections.extensions.base. + * AbstractFluentCollectionX#grouped(java.util.function.Function) */ @Override public LazySortedSetX>> grouped(Function classifier) { @@ -1293,6 +1785,7 @@ public LazySortedSetX>> grouped(Function t.map2(Comparables::comparable)); return (LazySortedSetX) stream(f); } + static class Comparables { static & Comparable> R comparable(Seq seq) { @@ -1308,10 +1801,12 @@ static & Comparable> R comparable(ReactiveSeq .findFirst() .get(); - return (R) Proxy.newProxyInstance(SortedSetX.class.getClassLoader(), new Class[] { ReactiveSeq.class, Comparable.class }, + return (R) Proxy.newProxyInstance(SortedSetX.class.getClassLoader(), + new Class[] { ReactiveSeq.class, Comparable.class }, (proxy, method, args) -> { if (compareTo.equals(method)) - return Objects.compare(System.identityHashCode(seq), System.identityHashCode(args[0]), + return Objects.compare(System.identityHashCode(seq), + System.identityHashCode(args[0]), Comparator.naturalOrder()); else return method.invoke(seq, args); diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/comprehenders/MonoTSeqComprehender.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/comprehenders/MonoTSeqComprehender.java index 842c13c8..fe0abfbd 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/comprehenders/MonoTSeqComprehender.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/comprehenders/MonoTSeqComprehender.java @@ -53,7 +53,7 @@ public Class getTargetClass() { @Override public MonoTSeq fromIterator(Iterator o) { - + return MonoTSeq.of(Monos.fromIterable(() -> o)); } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/AbstractPushablePublisher.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/AbstractPushablePublisher.java index fc5f0212..43c04451 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/AbstractPushablePublisher.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/AbstractPushablePublisher.java @@ -8,10 +8,11 @@ import com.aol.cyclops.data.async.Adapter; -public abstract class AbstractPushablePublisher, R extends Publisher> extends Tuple2 { +public abstract class AbstractPushablePublisher, R extends Publisher> extends Tuple2 { public AbstractPushablePublisher(X v1, R v2) { - super(v1, v2); + super( + v1, v2); } public X getInput() { diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/MultipleFluxSource.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/MultipleFluxSource.java index 4610cd9b..18cf3e80 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/MultipleFluxSource.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/MultipleFluxSource.java @@ -54,6 +54,7 @@ public ReactiveSeq reactiveSeq() { return topic.stream(); } + /** * Create a pushable Flux * diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/PushableFlux.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/PushableFlux.java index 789356c3..600ad274 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/PushableFlux.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/PushableFlux.java @@ -7,11 +7,11 @@ public class PushableFlux extends AbstractPushablePublisher, Flux> { public PushableFlux(Queue v1, Flux v2) { - super(v1, v2); + super( + v1, v2); } private static final long serialVersionUID = 1L; } - diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/PushableMono.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/PushableMono.java index ac26a54e..ccc63710 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/PushableMono.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/flux/pushable/PushableMono.java @@ -4,14 +4,14 @@ import reactor.core.publisher.Mono; -public class PushableMono extends AbstractPushablePublisher,Mono> { +public class PushableMono extends AbstractPushablePublisher, Mono> { public PushableMono(Queue v1, Mono v2) { - super(v1, v2); + super( + v1, v2); } private static final long serialVersionUID = 1L; } - diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/operators/GroupBySize.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/operators/GroupBySize.java index 753c8e67..bd8441b7 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/operators/GroupBySize.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/operators/GroupBySize.java @@ -31,9 +31,10 @@ public Flux grouped(int groupSize) { throw new IllegalArgumentException( "Batch size must be 1 or more"); SeqSubscriber sub = SeqSubscriber.subscriber(); - Iterator it = stream.subscribeWith(sub).iterator(); - - return Flux.fromIterable(()->new Iterator() { + Iterator it = stream.subscribeWith(sub) + .iterator(); + + return Flux.fromIterable(() -> new Iterator() { @Override public boolean hasNext() { diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/operators/GroupedWhile.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/operators/GroupedWhile.java index 4620130f..96fe537d 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/operators/GroupedWhile.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/operators/GroupedWhile.java @@ -1,7 +1,5 @@ package com.aol.cyclops.reactor.operators; - - import java.util.Collection; import java.util.Iterator; import java.util.function.Predicate; @@ -29,9 +27,10 @@ public GroupedWhile(Flux stream, Supplier factory) { public Flux batchWhile(Predicate predicate) { SeqSubscriber sub = SeqSubscriber.subscriber(); - Iterator it = stream.subscribeWith(sub).iterator(); - - return Flux.fromIterable(()->new Iterator() { + Iterator it = stream.subscribeWith(sub) + .iterator(); + + return Flux.fromIterable(() -> new Iterator() { T value = (T) UNSET; @Override @@ -62,7 +61,7 @@ public C next() { } }) - .filter(l -> l.size() > 0); + .filter(l -> l.size() > 0); } } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxT.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxT.java index d186cf3d..172bd338 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxT.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxT.java @@ -49,7 +49,6 @@ */ public interface FluxT extends FoldableTransformerSeq { - /** * Create an instance of the same FluxTransformer type from the provided Iterator over raw values. * @@ -339,7 +338,6 @@ public static FluxTValue fromFuture(CompletableFuture> future) { return FluxTValue.of(AnyM.fromCompletableFuture(future)); } - /** * Create a FluxTValue from an Iterable that contains nested Fluxes *
@@ -511,8 +509,12 @@ default  FluxT zip(Iterable other, BiFunction) FoldableTransformerSeq.super.zip(other, zipper);
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#zip(org.jooq.lambda.Seq, java.util.function.BiFunction)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.control.monads.transformers.values.TransformerSeq#zip(org
+     * .jooq.lambda.Seq, java.util.function.BiFunction)
      */
     @Override
     default  FluxT zip(Seq other, BiFunction zipper) {
@@ -539,8 +541,12 @@ default  FluxT> zip(Stream other) {
         return (FluxT) FoldableTransformerSeq.super.zip(other);
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#zip(org.jooq.lambda.Seq)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.control.monads.transformers.values.TransformerSeq#zip(org
+     * .jooq.lambda.Seq)
      */
     @Override
     default  FluxT> zip(Seq other) {
@@ -548,8 +554,12 @@ default  FluxT> zip(Seq other) {
         return (FluxT) FoldableTransformerSeq.super.zip(other);
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#zip(java.lang.Iterable)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.control.monads.transformers.values.TransformerSeq#zip(
+     * java.lang.Iterable)
      */
     @Override
     default  FluxT> zip(Iterable other) {
diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxTSeq.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxTSeq.java
index 583a4c44..406b8a08 100644
--- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxTSeq.java
+++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxTSeq.java
@@ -45,8 +45,11 @@ private FluxTSeq(final AnyMSeq> run) {
         this.run = (AnyMSeq) (run);
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#isSeqPresent()
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#
+     * isSeqPresent()
      */
     public boolean isSeqPresent() {
         return !run.isEmpty();
@@ -137,8 +140,12 @@ public  FluxTSeq flatMapT(Function> f) {
                                           . flatMap(a -> a)));
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.reactor.transformer.FluxT#flatMap(java.util.function.Function)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.reactor.transformer.FluxT#flatMap(java.util.function.
+     * Function)
      */
     public  FluxTSeq flatMap(Function> f) {
 
@@ -183,8 +190,6 @@ public static  FluxTSeq of(AnyMSeq> monads) {
                               monads);
     }
 
- 
-
     /*
      * (non-Javadoc)
      * 
@@ -204,8 +209,12 @@ public  FluxTSeq unit(T unit) {
         return of(run.unit(Flux.just(unit)));
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.FoldableTransformerSeq#stream()
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.control.monads.transformers.values.FoldableTransformerSeq
+     * #stream()
      */
     @Override
     public ReactiveSeq stream() {
@@ -214,7 +223,9 @@ public ReactiveSeq stream() {
                   .flatMap(e -> e);
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.reactor.transformer.FluxT#flux()
      */
     @Override
@@ -222,7 +233,9 @@ public Flux flux() {
         return Flux.from(stream());
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.lang.Iterable#iterator()
      */
     @Override
@@ -230,15 +243,20 @@ public Iterator iterator() {
         return stream().iterator();
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.reactor.transformer.FluxT#unitIterator(java.util.Iterator)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.reactor.transformer.FluxT#unitIterator(java.util.
+     * Iterator)
      */
     public  FluxTSeq unitIterator(Iterator it) {
         return of(run.unitIterator(it)
                      .map(i -> Flux.just(i)));
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.reactor.transformer.FluxT#empty()
      */
     @Override
@@ -246,7 +264,9 @@ public  FluxT empty() {
         return of(run.empty());
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.types.anyM.NestedFoldable#nestedFoldables()
      */
     @Override
@@ -255,7 +275,9 @@ public AnyM> nestedFoldables() {
 
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.types.anyM.NestedCollectable#nestedCollectables()
      */
     @Override
@@ -264,8 +286,11 @@ public AnyM> nestedCollectables() {
 
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#unitAnyM(com.aol.cyclops.control.AnyM)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#
+     * unitAnyM(com.aol.cyclops.control.AnyM)
      */
     @Override
     public  FluxTSeq unitAnyM(AnyM> traversable) {
@@ -273,15 +298,17 @@ public  FluxTSeq unitAnyM(AnyM> traversable) {
         return of((AnyMSeq) traversable.map(t -> Flux.fromIterable(t)));
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#transformerStream()
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#
+     * transformerStream()
      */
     @Override
     public AnyMSeq> transformerStream() {
         return run.map(i -> ReactiveSeq.fromPublisher(i));
     }
 
-
     /*
      * (non-Javadoc)
      * 
@@ -925,7 +952,9 @@ public > FluxTSeq sorted(Function> unwrap() {
         return run;
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#isSeqPresent()
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#
+     * isSeqPresent()
      */
     @Override
     public boolean isSeqPresent() {
@@ -122,8 +125,12 @@ public  FluxTValue flatMapT(Function> f
                                           . flatMap(a -> a)));
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.reactor.transformer.FluxT#flatMap(java.util.function.Function)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.reactor.transformer.FluxT#flatMap(java.util.function.
+     * Function)
      */
     public  FluxTValue flatMap(Function> f) {
 
@@ -137,7 +144,7 @@ public  FluxTValue flatMap(Function
      * This allows multiple monad types to add functionality to existing functions and methods
      * 
      * e.g. to add iteration handling (via Stream) and nullhandling (via Optional) to an existing function
-  
+    
      * 
      * 
      * @param fn Function to enhance with functionality from Stream and another monad type
@@ -168,7 +175,6 @@ public static  FluxTValue of(AnyMValue> monads) {
         return new FluxTValue<>(
                                 monads);
     }
-    
 
     /**
      * @return True if Flux is present
@@ -224,8 +230,12 @@ public  FluxTValue unit(T unit) {
         return of(run.unit(Flux.just(unit)));
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.FoldableTransformerSeq#stream()
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.control.monads.transformers.values.FoldableTransformerSeq
+     * #stream()
      */
     @Override
     public ReactiveSeq stream() {
@@ -234,7 +244,9 @@ public ReactiveSeq stream() {
                   .flatMap(e -> e);
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.reactor.transformer.FluxT#flux()
      */
     @Override
@@ -242,7 +254,9 @@ public Flux flux() {
         return Flux.from(stream());
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.reactor.transformer.FluxT#empty()
      */
     @Override
@@ -250,8 +264,9 @@ public  FluxTValue empty() {
         return of(run.empty());
     }
 
-    
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.types.anyM.NestedFoldable#nestedFoldables()
      */
     @Override
@@ -260,7 +275,9 @@ public AnyM> nestedFoldables() {
 
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.types.anyM.NestedCollectable#nestedCollectables()
      */
     @Override
@@ -269,8 +286,11 @@ public AnyM> nestedCollectables() {
 
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#unitAnyM(com.aol.cyclops.control.AnyM)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#
+     * unitAnyM(com.aol.cyclops.control.AnyM)
      */
     @Override
     public  FluxTValue unitAnyM(AnyM> traversable) {
@@ -278,15 +298,20 @@ public  FluxTValue unitAnyM(AnyM> traversable) {
         return of((AnyMValue) traversable.map(t -> Flux.fromIterable(t)));
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#transformerStream()
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#
+     * transformerStream()
      */
     @Override
     public AnyM> transformerStream() {
         return run.map(i -> ReactiveSeq.fromPublisher(i));
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.lang.Object#hashCode()
      */
     @Override
@@ -294,7 +319,9 @@ public int hashCode() {
         return run.hashCode();
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.lang.Object#equals(java.lang.Object)
      */
     @Override
diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoT.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoT.java
index af702e98..53435c1a 100644
--- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoT.java
+++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoT.java
@@ -1,6 +1,5 @@
 package com.aol.cyclops.reactor.transformer;
 
-
 import java.util.Iterator;
 import java.util.Optional;
 import java.util.concurrent.CompletableFuture;
@@ -31,7 +30,6 @@
 
 import reactor.core.publisher.Mono;
 
-
 /**
  * Monad Transformer for Reactor Mono types.
  * 
@@ -43,8 +41,11 @@
  */
 public interface MonoT extends Unit, Publisher, Functor, Filterable, ToStream {
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.types.Filterable#filter(java.util.function.Predicate)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.types.Filterable#filter(java.util.function.Predicate)
      */
     MonoT filter(Predicate test);
 
@@ -60,7 +61,7 @@ public interface MonoT extends Unit, Publisher, Functor, Filterable<
      * @return Mapped and flattened MonoT
      */
     default  MonoT bind(Function> f) {
-        return of(unwrap().bind(mono-> {
+        return of(unwrap().bind(mono -> {
             return f.apply(mono.block())
                     .unwrap()
                     .unwrap();
@@ -128,7 +129,6 @@ public static  MonoT of(AnyM> monads) {
     @Override
     public  MonoT map(Function f);
 
- 
     /**
      * flatMap operation
      * 
@@ -169,7 +169,8 @@ public static  Function, MonoT> lift(Function BiFunction, MonoT, MonoT> lift2(BiFunction fn) {
+    public static  BiFunction, MonoT, MonoT> lift2(
+            BiFunction fn) {
         return (optTu1, optTu2) -> optTu1.bind(input1 -> optTu2.map(input2 -> fn.apply(input1, input2)));
     }
 
@@ -183,6 +184,7 @@ public static  BiFunction, MonoT, MonoT> lift2(BiFun
     public static  MonoT fromAnyM(AnyM anyM) {
         return of(anyM.map(Mono::just));
     }
+
     /**
      * Create a MonoT from an AnyMValue by wrapping the element stored in the AnyMValue in a Mono
      * 
@@ -192,6 +194,7 @@ public static  MonoT fromAnyM(AnyM anyM) {
     public static  MonoTValue fromAnyMValue(AnyMValue anyM) {
         return MonoTValue.fromAnyM(anyM);
     }
+
     /**
      * Create a MonoT from an AnyMSeq by wrapping the elements stored in the AnyMSeq in a Mono
      * 
@@ -201,6 +204,7 @@ public static  MonoTValue fromAnyMValue(AnyMValue anyM) {
     public static  MonoTSeq fromAnyMSeq(AnyMSeq anyM) {
         return MonoTSeq.fromAnyM(anyM);
     }
+
     /**
      * Create a MonoTSeq from an Iterable that contains nested Monos
      * 
@@ -247,7 +251,9 @@ public static  MonoTSeq emptyList() {
         return MonoT.fromIterable(ListX.of());
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.types.Functor#cast(java.lang.Class)
      */
     @Override
@@ -255,23 +261,33 @@ default  MonoT cast(Class type) {
         return (MonoT) Functor.super.cast(type);
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.types.Functor#trampoline(java.util.function.Function)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.types.Functor#trampoline(java.util.function.Function)
      */
     @Override
     default  MonoT trampoline(Function> mapper) {
         return (MonoT) Functor.super.trampoline(mapper);
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.types.Functor#patternMatch(java.util.function.Function, java.util.function.Supplier)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.types.Functor#patternMatch(java.util.function.Function,
+     * java.util.function.Supplier)
      */
     @Override
-    default  MonoT patternMatch(Function, CheckValue1> case1, Supplier otherwise) {
+    default  MonoT patternMatch(Function, CheckValue1> case1,
+            Supplier otherwise) {
         return (MonoT) Functor.super.patternMatch(case1, otherwise);
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.types.Filterable#ofType(java.lang.Class)
      */
     @Override
@@ -280,8 +296,11 @@ default  MonoT ofType(Class type) {
         return (MonoT) Filterable.super.ofType(type);
     }
 
-    /* (non-Javadoc)
-     * @see com.aol.cyclops.types.Filterable#filterNot(java.util.function.Predicate)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.types.Filterable#filterNot(java.util.function.Predicate)
      */
     @Override
     default MonoT filterNot(Predicate fn) {
@@ -289,7 +308,9 @@ default MonoT filterNot(Predicate fn) {
         return (MonoT) Filterable.super.filterNot(fn);
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see com.aol.cyclops.types.Filterable#notNull()
      */
     @Override
@@ -298,8 +319,4 @@ default MonoT notNull() {
         return (MonoT) Filterable.super.notNull();
     }
 
-    
-
-   
-
 }
\ No newline at end of file
diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTSeq.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTSeq.java
index 02a9c8d2..bc09514a 100644
--- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTSeq.java
+++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTSeq.java
@@ -23,7 +23,6 @@
 import com.aol.cyclops.Monoid;
 import com.aol.cyclops.control.AnyM;
 import com.aol.cyclops.control.ReactiveSeq;
-import com.aol.cyclops.control.monads.transformers.seq.MaybeTSeq;
 import com.aol.cyclops.control.monads.transformers.values.ValueTransformerSeq;
 import com.aol.cyclops.data.collections.extensions.standard.ListX;
 import com.aol.cyclops.types.IterableFoldable;
@@ -36,7 +35,6 @@
 
 import reactor.core.publisher.Mono;
 
-
 /**
  * Monad Transformer for Reactor Monos nested inside Sequential data types
  * 
@@ -44,14 +42,15 @@
  *
  * @param  the type of elements held in the nested Monos
  */
-public class MonoTSeq
-        implements MonoT, ValueTransformerSeq, IterableFoldable, ConvertableSequence, CyclopsCollectable, Sequential {
+public class MonoTSeq implements MonoT, ValueTransformerSeq, IterableFoldable, ConvertableSequence,
+        CyclopsCollectable, Sequential {
 
     private final AnyMSeq> run;
 
     /**
      * @return The wrapped AnyM
      */
+    @Override
     public AnyMSeq> unwrap() {
         return run;
     }
@@ -60,69 +59,78 @@ private MonoTSeq(final AnyMSeq> run) {
         this.run = run;
     }
 
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * com.aol.cyclops.control.monads.transformers.values.ValueTransformerSeq#
+     * unitStream(com.aol.cyclops.control.ReactiveSeq)
+     */
     @Override
-    public  MonoTSeq unitStream(ReactiveSeq traversable) {
+    public  MonoTSeq unitStream(final ReactiveSeq traversable) {
         return MonoT.fromStream(traversable.map(Mono::just));
 
     }
 
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#
+     * unitAnyM(com.aol.cyclops.control.AnyM)
+     */
     @Override
-    public  MonoTSeq unitAnyM(AnyM> traversable) {
+    public  MonoTSeq unitAnyM(final AnyM> traversable) {
 
         return of((AnyMSeq) traversable.map(t -> Mono.from(t)));
     }
 
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq#
+     * transformerStream()
+     */
     @Override
     public AnyMSeq> transformerStream() {
 
         return run.map(f -> ListX.of(f.block()));
     }
 
-    
-    public MonoTSeq filter(Predicate test) {
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.aol.cyclops.reactor.transformer.MonoT#filter(java.util.function.
+     * Predicate)
+     */
+    @Override
+    public MonoTSeq filter(final Predicate test) {
         return MonoTSeq.of(run.map(opt -> opt.filter(test)));
     }
 
-    /**
-     * Peek at the current value of the Mono
-     * 
-     * {@code 
-     *    MonoT.of(AnyM.fromStream(Arrays.asMono(10))
-     *             .peek(System.out::println);
-     *             
-     *     //prints 10        
-     * }
-     * 
+ /* + * (non-Javadoc) * - * @param peek Consumer to accept current value of Mono - * @return MonoT with peek call + * @see com.aol.cyclops.reactor.transformer.MonoT#peek(java.util.function. + * Consumer) */ - public MonoTSeq
peek(Consumer peek) { + @Override + public MonoTSeq peek(final Consumer peek) { return of(run.peek(future -> future.map(a -> { peek.accept(a); return a; }))); } - /** - * Map the wrapped Mono - * - *
-     * {@code 
-     *  MonoT.of(AnyM.fromStream(Arrays.asMono(10))
-     *             .map(t->t=t+1);
-     *  
-     *  
-     *  //MonoT>>
-     * }
-     * 
+ /* + * (non-Javadoc) * - * @param f Mapping function for the wrapped Mono - * @return MonoT that applies the map function to the wrapped Mono + * @see com.aol.cyclops.reactor.transformer.MonoT#map(java.util.function. + * Function) */ - public MonoTSeq map(Function f) { + @Override + public MonoTSeq map(final Function f) { return new MonoTSeq( - run.map(o -> o.map(f))); + run.map(o -> o.map(f))); } /** @@ -140,19 +148,27 @@ public MonoTSeq map(Function f) { * @return MonoT that applies the flatMap function to the wrapped Mono */ - public MonoTSeq flatMapT(Function> f) { + public MonoTSeq flatMapT(final Function> f) { return of(run.map(future -> Mono.from(future.flatMap(a -> f.apply(a).run.stream() - .toList() - .get(0))))); + .toList() + .get(0))))); } - private static AnyMSeq> narrow(AnyMSeq> run) { + private static AnyMSeq> narrow(final AnyMSeq> run) { return (AnyMSeq) run; } - public MonoTSeq flatMap(Function> f) { + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.transformer.MonoT#flatMap(java.util.function. + * Function) + */ + @Override + public MonoTSeq flatMap(final Function> f) { - AnyMSeq> mapped = run.map(o -> Mono.from(o.flatMap(f))); + final AnyMSeq> mapped = run.map(o -> Mono.from(o.flatMap(f))); return of(narrow(mapped)); } @@ -162,31 +178,13 @@ public MonoTSeq flatMap(Function - * {@code - Function add2 = i -> i+2; - Function, MonoT> optTAdd2 = MonoT.lift(add2); - - Stream withNulls = Stream.of(1,2,3); - AnyMSeq stream = AnyM.fromStream(withNulls); - AnyMSeq> streamOpt = stream.map(Mono::completedFuture); - List results = optTAdd2.apply(MonoT.of(streamOpt)) - .unwrap() - .>>unwrap() - .map(Mono::join) - .collect(Collectors.toList()); - - - //Mono.completedFuture(List[3,4]); - * - * - * }
+ * * * @param fn Function to enhance with functionality from Mono and another monad type * @return Function that accepts and returns an MonoT */ - public static Function, MonoTSeq> lift(Function fn) { + public static Function, MonoTSeq> lift(final Function fn) { return optTu -> optTu.map(input -> fn.apply(input)); } @@ -196,31 +194,12 @@ public static Function, MonoTSeq> lift(Function - * {@code - BiFunction add = (a,b) -> a+b; - BiFunction,MonoT,MonoT> optTAdd2 = MonoT.lift2(add); - - Stream withNulls = Stream.of(1,2,3); - AnyMSeq stream = AnyM.ofMonad(withNulls); - AnyMSeq> streamOpt = stream.map(Mono::completedFuture); - - Mono> two = Mono.completedFuture(Mono.completedFuture(2)); - AnyMSeq> future= AnyM.fromMono(two); - List results = optTAdd2.apply(MonoT.of(streamOpt),MonoT.of(future)) - .unwrap() - .>>unwrap() - .map(Mono::join) - .collect(Collectors.toList()); - - //Mono.completedFuture(List[3,4,5]); - } -
+ * @param fn BiFunction to enhance with functionality from Mono and another monad type * @return Function that accepts and returns an MonoT */ - public static BiFunction, MonoTSeq, MonoTSeq> lift2(BiFunction fn) { + public static BiFunction, MonoTSeq, MonoTSeq> lift2( + final BiFunction fn) { return (optTu1, optTu2) -> optTu1.flatMapT(input1 -> optTu2.map(input2 -> fn.apply(input1, input2))); } @@ -231,7 +210,7 @@ public static BiFunction, MonoTSeq, MonoTSeq> li * @param anyM AnyM that doesn't contain a monad wrapping an Mono * @return MonoT */ - public static MonoTSeq fromAnyM(AnyMSeq anyM) { + public static MonoTSeq fromAnyM(final AnyMSeq anyM) { return of(anyM.map(Mono::just)); } @@ -241,12 +220,12 @@ public static MonoTSeq fromAnyM(AnyMSeq anyM) { * @param monads AnyM that contains a monad wrapping an Mono * @return MonoT */ - public static MonoTSeq of(AnyMSeq> monads) { + public static MonoTSeq of(final AnyMSeq> monads) { return new MonoTSeq<>( - monads); + monads); } - public static MonoTSeq of(Mono monads) { + public static MonoTSeq of(final Mono monads) { return MonoT.fromIterable(ListX.of(monads)); } @@ -255,35 +234,60 @@ public static MonoTSeq of(Mono monads) { * * @see java.lang.Object#toString() */ + @Override public String toString() { return String.format("FutureTSeq[%s]", run); } + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.types.stream.ToStream#stream() + */ @Override public ReactiveSeq stream() { return run.stream() .map(cf -> cf.block()); } + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.types.stream.ToStream#iterator() + */ @Override public Iterator iterator() { return stream().iterator(); } - public MonoTSeq unitIterator(Iterator it) { + public MonoTSeq unitIterator(final Iterator it) { return of(run.unitIterator(it) .map(i -> Mono.just(i))); } - public MonoTSeq unit(R value) { + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.types.Unit#unit(java.lang.Object) + */ + @Override + public MonoTSeq unit(final R value) { return of(run.unit(Mono.just(value))); } + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.transformer.MonoT#empty() + */ + @Override public MonoTSeq empty() { return of(run.unit(Mono.empty())); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.stream.CyclopsCollectable#collectable() */ @Override @@ -291,6 +295,13 @@ public Collectable collectable() { return stream(); } + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.TransformerSeq# + * isSeqPresent() + */ + @Override public boolean isSeqPresent() { return !run.isEmpty(); } @@ -299,117 +310,183 @@ public static MonoTSeq emptyList() { return MonoT.fromIterable(ListX.of()); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#combine(java.util.function.BiPredicate, java.util.function.BinaryOperator) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#combine( + * java.util.function.BiPredicate, java.util.function.BinaryOperator) */ @Override - public MonoTSeq combine(BiPredicate predicate, BinaryOperator op) { + public MonoTSeq combine(final BiPredicate predicate, final BinaryOperator op) { return (MonoTSeq) ValueTransformerSeq.super.combine(predicate, op); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#cycle(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#cycle(int) */ @Override - public MonoTSeq cycle(int times) { + public MonoTSeq cycle(final int times) { return (MonoTSeq) ValueTransformerSeq.super.cycle(times); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#cycle(com.aol.cyclops.Monoid, int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#cycle(com. + * aol.cyclops.Monoid, int) */ @Override - public MonoTSeq cycle(Monoid m, int times) { + public MonoTSeq cycle(final Monoid m, final int times) { return (MonoTSeq) ValueTransformerSeq.super.cycle(m, times); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#cycleWhile(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#cycleWhile + * (java.util.function.Predicate) */ @Override - public MonoTSeq cycleWhile(Predicate predicate) { + public MonoTSeq cycleWhile(final Predicate predicate) { return (MonoTSeq) ValueTransformerSeq.super.cycleWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#cycleUntil(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#cycleUntil + * (java.util.function.Predicate) */ @Override - public MonoTSeq cycleUntil(Predicate predicate) { + public MonoTSeq cycleUntil(final Predicate predicate) { return (MonoTSeq) ValueTransformerSeq.super.cycleUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#zip(java.lang.Iterable, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#zip(java. + * lang.Iterable, java.util.function.BiFunction) */ @Override - public MonoTSeq zip(Iterable other, BiFunction zipper) { + public MonoTSeq zip(final Iterable other, + final BiFunction zipper) { return (MonoTSeq) ValueTransformerSeq.super.zip(other, zipper); } + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.ValueTransformerSeq# + * zip(java.util.stream.Stream, java.util.function.BiFunction) + */ @Override - public MonoTSeq zip(Stream other, BiFunction zipper) { + public MonoTSeq zip(final Stream other, + final BiFunction zipper) { return (MonoTSeq) ValueTransformerSeq.super.zip(other, zipper); } + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.ValueTransformerSeq# + * zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + */ @Override - public MonoTSeq zip(Seq other, BiFunction zipper) { + public MonoTSeq zip(final Seq other, + final BiFunction zipper) { return (MonoTSeq) ValueTransformerSeq.super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#zip(java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#zip(java. + * util.stream.Stream) */ @Override - public MonoTSeq> zip(Stream other) { + public MonoTSeq> zip(final Stream other) { return (MonoTSeq) ValueTransformerSeq.super.zip(other); } + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.ValueTransformerSeq# + * zip(java.lang.Iterable) + */ @Override - public MonoTSeq> zip(Iterable other) { + public MonoTSeq> zip(final Iterable other) { return (MonoTSeq) ValueTransformerSeq.super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#zip(org.jooq.lambda.Seq) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#zip(org. + * jooq.lambda.Seq) */ @Override - public MonoTSeq> zip(Seq other) { + public MonoTSeq> zip(final Seq other) { return (MonoTSeq) ValueTransformerSeq.super.zip(other); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#zip3(java.util.stream.Stream, java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#zip3(java. + * util.stream.Stream, java.util.stream.Stream) */ @Override - public MonoTSeq> zip3(Stream second, Stream third) { + public MonoTSeq> zip3(final Stream second, final Stream third) { return (MonoTSeq) ValueTransformerSeq.super.zip3(second, third); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#zip4(java.util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#zip4(java. + * util.stream.Stream, java.util.stream.Stream, java.util.stream.Stream) */ @Override - public MonoTSeq> zip4(Stream second, Stream third, - Stream fourth) { + public MonoTSeq> zip4(final Stream second, + final Stream third, final Stream fourth) { return (MonoTSeq) ValueTransformerSeq.super.zip4(second, third, fourth); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#zipWithIndex() + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.Traversable# + * zipWithIndex() */ @Override public MonoTSeq> zipWithIndex() { @@ -417,107 +494,152 @@ public MonoTSeq> zipWithIndex() { return (MonoTSeq>) ValueTransformerSeq.super.zipWithIndex(); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#sliding(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#sliding( + * int) */ @Override - public MonoTSeq> sliding(int windowSize) { + public MonoTSeq> sliding(final int windowSize) { return (MonoTSeq>) ValueTransformerSeq.super.sliding(windowSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#sliding(int, int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#sliding( + * int, int) */ @Override - public MonoTSeq> sliding(int windowSize, int increment) { + public MonoTSeq> sliding(final int windowSize, final int increment) { return (MonoTSeq>) ValueTransformerSeq.super.sliding(windowSize, increment); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#grouped(int, java.util.function.Supplier) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#grouped( + * int, java.util.function.Supplier) */ @Override - public > MonoTSeq grouped(int size, Supplier supplier) { + public > MonoTSeq grouped(final int size, final Supplier supplier) { return (MonoTSeq) ValueTransformerSeq.super.grouped(size, supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#groupedUntil(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.Traversable# + * groupedUntil(java.util.function.Predicate) */ @Override - public MonoTSeq> groupedUntil(Predicate predicate) { + public MonoTSeq> groupedUntil(final Predicate predicate) { return (MonoTSeq>) ValueTransformerSeq.super.groupedUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#groupedStatefullyUntil(java.util.function.BiPredicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.Traversable# + * groupedStatefullyUntil(java.util.function.BiPredicate) */ @Override - public MonoTSeq> groupedStatefullyUntil(BiPredicate, ? super A> predicate) { + public MonoTSeq> groupedStatefullyUntil(final BiPredicate, ? super A> predicate) { return (MonoTSeq>) ValueTransformerSeq.super.groupedStatefullyUntil(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#groupedWhile(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.Traversable# + * groupedWhile(java.util.function.Predicate) */ @Override - public MonoTSeq> groupedWhile(Predicate predicate) { + public MonoTSeq> groupedWhile(final Predicate predicate) { return (MonoTSeq>) ValueTransformerSeq.super.groupedWhile(predicate); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#groupedWhile(java.util.function.Predicate, java.util.function.Supplier) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.Traversable# + * groupedWhile(java.util.function.Predicate, java.util.function.Supplier) */ @Override - public > MonoTSeq groupedWhile(Predicate predicate, Supplier factory) { + public > MonoTSeq groupedWhile(final Predicate predicate, + final Supplier factory) { return (MonoTSeq) ValueTransformerSeq.super.groupedWhile(predicate, factory); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#groupedUntil(java.util.function.Predicate, java.util.function.Supplier) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.Traversable# + * groupedUntil(java.util.function.Predicate, java.util.function.Supplier) */ @Override - public > MonoTSeq groupedUntil(Predicate predicate, Supplier factory) { + public > MonoTSeq groupedUntil(final Predicate predicate, + final Supplier factory) { return (MonoTSeq) ValueTransformerSeq.super.groupedUntil(predicate, factory); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#grouped(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#grouped( + * int) */ @Override - public MonoTSeq> grouped(int groupSize) { + public MonoTSeq> grouped(final int groupSize) { return (MonoTSeq>) ValueTransformerSeq.super.grouped(groupSize); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#grouped(java.util.function.Function, java.util.stream.Collector) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#grouped( + * java.util.function.Function, java.util.stream.Collector) */ @Override - public MonoTSeq> grouped(Function classifier, Collector downstream) { + public MonoTSeq> grouped(final Function classifier, + final Collector downstream) { return (MonoTSeq) ValueTransformerSeq.super.grouped(classifier, downstream); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#grouped(java.util.function.Function) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#grouped( + * java.util.function.Function) */ @Override - public MonoTSeq>> grouped(Function classifier) { + public MonoTSeq>> grouped(final Function classifier) { return (MonoTSeq) ValueTransformerSeq.super.grouped(classifier); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#distinct() + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#distinct() */ @Override public MonoTSeq distinct() { @@ -525,44 +647,63 @@ public MonoTSeq distinct() { return (MonoTSeq) ValueTransformerSeq.super.distinct(); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#scanLeft(com.aol.cyclops.Monoid) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#scanLeft( + * com.aol.cyclops.Monoid) */ @Override - public MonoTSeq scanLeft(Monoid monoid) { + public MonoTSeq scanLeft(final Monoid monoid) { return (MonoTSeq) ValueTransformerSeq.super.scanLeft(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#scanLeft(java.lang.Object, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#scanLeft( + * java.lang.Object, java.util.function.BiFunction) */ @Override - public MonoTSeq scanLeft(U seed, BiFunction function) { + public MonoTSeq scanLeft(final U seed, final BiFunction function) { return (MonoTSeq) ValueTransformerSeq.super.scanLeft(seed, function); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#scanRight(com.aol.cyclops.Monoid) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#scanRight( + * com.aol.cyclops.Monoid) */ @Override - public MonoTSeq scanRight(Monoid monoid) { + public MonoTSeq scanRight(final Monoid monoid) { return (MonoTSeq) ValueTransformerSeq.super.scanRight(monoid); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#scanRight(java.lang.Object, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#scanRight( + * java.lang.Object, java.util.function.BiFunction) */ @Override - public MonoTSeq scanRight(U identity, BiFunction combiner) { + public MonoTSeq scanRight(final U identity, final BiFunction combiner) { return (MonoTSeq) ValueTransformerSeq.super.scanRight(identity, combiner); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#sorted() + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#sorted() */ @Override public MonoTSeq sorted() { @@ -570,134 +711,191 @@ public MonoTSeq sorted() { return (MonoTSeq) ValueTransformerSeq.super.sorted(); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#sorted(java.util.Comparator) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#sorted( + * java.util.Comparator) */ @Override - public MonoTSeq sorted(Comparator c) { + public MonoTSeq sorted(final Comparator c) { return (MonoTSeq) ValueTransformerSeq.super.sorted(c); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#takeWhile(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#takeWhile( + * java.util.function.Predicate) */ @Override - public MonoTSeq takeWhile(Predicate p) { + public MonoTSeq takeWhile(final Predicate p) { return (MonoTSeq) ValueTransformerSeq.super.takeWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#dropWhile(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#dropWhile( + * java.util.function.Predicate) */ @Override - public MonoTSeq dropWhile(Predicate p) { + public MonoTSeq dropWhile(final Predicate p) { return (MonoTSeq) ValueTransformerSeq.super.dropWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#takeUntil(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#takeUntil( + * java.util.function.Predicate) */ @Override - public MonoTSeq takeUntil(Predicate p) { + public MonoTSeq takeUntil(final Predicate p) { return (MonoTSeq) ValueTransformerSeq.super.takeUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#dropUntil(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#dropUntil( + * java.util.function.Predicate) */ @Override - public MonoTSeq dropUntil(Predicate p) { + public MonoTSeq dropUntil(final Predicate p) { return (MonoTSeq) ValueTransformerSeq.super.dropUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#dropRight(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#dropRight( + * int) */ @Override - public MonoTSeq dropRight(int num) { + public MonoTSeq dropRight(final int num) { return (MonoTSeq) ValueTransformerSeq.super.dropRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#takeRight(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#takeRight( + * int) */ @Override - public MonoTSeq takeRight(int num) { + public MonoTSeq takeRight(final int num) { return (MonoTSeq) ValueTransformerSeq.super.takeRight(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#skip(long) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#skip(long) */ @Override - public MonoTSeq skip(long num) { + public MonoTSeq skip(final long num) { return (MonoTSeq) ValueTransformerSeq.super.skip(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#skipWhile(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#skipWhile( + * java.util.function.Predicate) */ @Override - public MonoTSeq skipWhile(Predicate p) { + public MonoTSeq skipWhile(final Predicate p) { return (MonoTSeq) ValueTransformerSeq.super.skipWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#skipUntil(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#skipUntil( + * java.util.function.Predicate) */ @Override - public MonoTSeq skipUntil(Predicate p) { + public MonoTSeq skipUntil(final Predicate p) { return (MonoTSeq) ValueTransformerSeq.super.skipUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#limit(long) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#limit( + * long) */ @Override - public MonoTSeq limit(long num) { + public MonoTSeq limit(final long num) { return (MonoTSeq) ValueTransformerSeq.super.limit(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#limitWhile(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#limitWhile + * (java.util.function.Predicate) */ @Override - public MonoTSeq limitWhile(Predicate p) { + public MonoTSeq limitWhile(final Predicate p) { return (MonoTSeq) ValueTransformerSeq.super.limitWhile(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#limitUntil(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#limitUntil + * (java.util.function.Predicate) */ @Override - public MonoTSeq limitUntil(Predicate p) { + public MonoTSeq limitUntil(final Predicate p) { return (MonoTSeq) ValueTransformerSeq.super.limitUntil(p); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#intersperse(java.lang.Object) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.Traversable# + * intersperse(java.lang.Object) */ @Override - public MonoTSeq intersperse(A value) { + public MonoTSeq intersperse(final A value) { return (MonoTSeq) ValueTransformerSeq.super.intersperse(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#reverse() + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#reverse() */ @Override public MonoTSeq reverse() { @@ -705,8 +903,11 @@ public MonoTSeq reverse() { return (MonoTSeq) ValueTransformerSeq.super.reverse(); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#shuffle() + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#shuffle() */ @Override public MonoTSeq shuffle() { @@ -714,84 +915,125 @@ public MonoTSeq shuffle() { return (MonoTSeq) ValueTransformerSeq.super.shuffle(); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#skipLast(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#skipLast( + * int) */ @Override - public MonoTSeq skipLast(int num) { + public MonoTSeq skipLast(final int num) { return (MonoTSeq) ValueTransformerSeq.super.skipLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#limitLast(int) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#limitLast( + * int) */ @Override - public MonoTSeq limitLast(int num) { + public MonoTSeq limitLast(final int num) { return (MonoTSeq) ValueTransformerSeq.super.limitLast(num); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#onEmpty(java.lang.Object) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#onEmpty( + * java.lang.Object) */ @Override - public MonoTSeq onEmpty(A value) { + public MonoTSeq onEmpty(final A value) { return (MonoTSeq) ValueTransformerSeq.super.onEmpty(value); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#onEmptyGet(java.util.function.Supplier) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#onEmptyGet + * (java.util.function.Supplier) */ @Override - public MonoTSeq onEmptyGet(Supplier supplier) { + public MonoTSeq onEmptyGet(final Supplier supplier) { return (MonoTSeq) ValueTransformerSeq.super.onEmptyGet(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#onEmptyThrow(java.util.function.Supplier) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.Traversable# + * onEmptyThrow(java.util.function.Supplier) */ @Override - public MonoTSeq onEmptyThrow(Supplier supplier) { + public MonoTSeq onEmptyThrow(final Supplier supplier) { return (MonoTSeq) ValueTransformerSeq.super.onEmptyThrow(supplier); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#shuffle(java.util.Random) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#shuffle( + * java.util.Random) */ @Override - public MonoTSeq shuffle(Random random) { + public MonoTSeq shuffle(final Random random) { return (MonoTSeq) ValueTransformerSeq.super.shuffle(random); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#slice(long, long) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#slice( + * long, long) */ @Override - public MonoTSeq slice(long from, long to) { + public MonoTSeq slice(final long from, final long to) { return (MonoTSeq) ValueTransformerSeq.super.slice(from, to); } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.Traversable#sorted(java.util.function.Function) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.Traversable#sorted( + * java.util.function.Function) */ @Override - public > MonoTSeq sorted(Function function) { + public > MonoTSeq sorted(final Function function) { return (MonoTSeq) ValueTransformerSeq.super.sorted(function); } + /* + * (non-Javadoc) + * + * @see java.lang.Object#hashCode() + */ @Override public int hashCode() { return run.hashCode(); } + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (o instanceof MonoTSeq) { return run.equals(((MonoTSeq) o).run); } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTValue.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTValue.java index c3642b22..a8407b5b 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTValue.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTValue.java @@ -16,7 +16,6 @@ import org.reactivestreams.Subscriber; import com.aol.cyclops.Monoid; -import com.aol.cyclops.control.AnyM; import com.aol.cyclops.control.FutureW; import com.aol.cyclops.control.Matchable; import com.aol.cyclops.control.Matchable.CheckValue1; @@ -36,15 +35,15 @@ import lombok.val; import reactor.core.publisher.Mono; - -public class MonoTValue implements MonoT, TransformerValue, MonadicValue1, Supplier, ConvertableFunctor, Filterable, - ApplicativeFunctor, Matchable.ValueAndOptionalMatcher { +public class MonoTValue implements MonoT, TransformerValue, MonadicValue1, Supplier, + ConvertableFunctor, Filterable, ApplicativeFunctor, Matchable.ValueAndOptionalMatcher { private final AnyMValue> run; /** * @return The wrapped AnyM */ + @Override public AnyMValue> unwrap() { return run; } @@ -53,59 +52,82 @@ private MonoTValue(final AnyMValue> run) { this.run = run; } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.TransformerValue#value() + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.control.monads.transformers.values.TransformerValue#value + * () */ + @Override public FutureW value() { - return FutureW.of(run.get().toFuture()); + return FutureW.of(run.get() + .toFuture()); } - /* + + /* * Blocking request that checks for the presence of a result * * (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.TransformerValue#isPresent() + * + * @see com.aol.cyclops.control.monads.transformers.values.TransformerValue# + * isPresent() */ + @Override public boolean isPresent() { - Mono val = run.orElse(Mono.empty()); - return val.block()!=null; + final Mono val = run.orElse(Mono.empty()); + return val.block() != null; } - /* (non-Javadoc) - * @see com.aol.cyclops.control.monads.transformers.values.TransformerValue#isValuePresent() + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.control.monads.transformers.values.TransformerValue# + * isValuePresent() */ + @Override public boolean isValuePresent() { return !run.isEmpty(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.transformer.MonoT#filter(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.transformer.MonoT#filter(java.util.function. + * Predicate) */ @Override - public MonoTValue filter(Predicate test) { - - AnyMValue> x = run.map(opt -> opt.filter(test)); + public MonoTValue filter(final Predicate test) { + + final AnyMValue> x = run.map(opt -> opt.filter(test)); return MonoTValue.of(x); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.transformer.MonoT#peek(java.util.function.Consumer) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.transformer.MonoT#peek(java.util.function. + * Consumer) */ @Override - public MonoTValue peek(Consumer peek) { - return map(e->{ - peek.accept(e); - return e; + public MonoTValue peek(final Consumer peek) { + return map(e -> { + peek.accept(e); + return e; }); - + } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.transformer.MonoT#map(java.util.function.Function) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.transformer.MonoT#map(java.util.function. + * Function) */ @Override - public MonoTValue map(Function f) { + public MonoTValue map(final Function f) { return new MonoTValue( - run.map(o -> o.map(f))); + run.map(o -> o.map(f))); } /* @@ -116,9 +138,10 @@ public MonoTValue map(Function f) { * types.Value, java.util.function.BiFunction) */ @Override - public MonoTValue combine(Value app, BiFunction fn) { + public MonoTValue combine(final Value app, + final BiFunction fn) { return new MonoTValue( - run.map(o -> Monos.combine(o,app, fn))); + run.map(o -> Monos.combine(o, app, fn))); } /* @@ -128,10 +151,11 @@ public MonoTValue combine(Value app, BiFunction MonoTValue zip(Iterable app, BiFunction fn) { + public MonoTValue zip(final Iterable app, + final BiFunction fn) { return new MonoTValue( - run.map(o -> Monos.zip(o,app, fn))); + run.map(o -> Monos.zip(o, app, fn))); } /* @@ -141,52 +165,67 @@ public MonoTValue zip(Iterable app, BiFunction MonoTValue zip(BiFunction fn, Publisher app) { + public MonoTValue zip(final BiFunction fn, + final Publisher app) { return new MonoTValue<>( - run.map(o -> Monos.zip(o,fn, app))); + run.map(o -> Monos.zip(o, fn, app))); } - /* (non-Javadoc) - * @see com.aol.cyclops.types.Zippable#zip(org.jooq.lambda.Seq, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.types.Zippable#zip(org.jooq.lambda.Seq, + * java.util.function.BiFunction) */ @Override - public MonoTValue zip(Seq other, BiFunction zipper) { + public MonoTValue zip(final Seq other, + final BiFunction zipper) { return (MonoTValue) TransformerValue.super.zip(other, zipper); } - /* (non-Javadoc) - * @see com.aol.cyclops.types.Zippable#zip(java.util.stream.Stream, java.util.function.BiFunction) + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.types.Zippable#zip(java.util.stream.Stream, + * java.util.function.BiFunction) */ @Override - public MonoTValue zip(Stream other, BiFunction zipper) { + public MonoTValue zip(final Stream other, + final BiFunction zipper) { return (MonoTValue) TransformerValue.super.zip(other, zipper); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Zippable#zip(java.util.stream.Stream) */ @Override - public MonoTValue> zip(Stream other) { + public MonoTValue> zip(final Stream other) { return (MonoTValue) TransformerValue.super.zip(other); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Zippable#zip(org.jooq.lambda.Seq) */ @Override - public MonoTValue> zip(Seq other) { + public MonoTValue> zip(final Seq other) { return (MonoTValue) TransformerValue.super.zip(other); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Zippable#zip(java.lang.Iterable) */ @Override - public MonoTValue> zip(Iterable other) { + public MonoTValue> zip(final Iterable other) { return (MonoTValue) TransformerValue.super.zip(other); } @@ -205,24 +244,27 @@ public MonoTValue> zip(Iterable other) { * @param f FlatMap function * @return MonoT that applies the flatMap function to the wrapped CompletableFuture */ - public MonoTValue flatMapT(Function> f) { + public MonoTValue flatMapT(final Function> f) { return of(run.map(future -> Mono.from(future.flatMap(a -> f.apply(a).run.stream() - .toList() - .get(0))))); + .toList() + .get(0))))); } - private static AnyMValue> narrow(AnyMValue> run) { + private static AnyMValue> narrow(final AnyMValue> run) { return (AnyMValue) run; } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.transformer.MonoT#flatMap(java.util.function.Function) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.transformer.MonoT#flatMap(java.util.function. + * Function) */ @Override - public MonoTValue flatMap(Function> f) { + public MonoTValue flatMap(final Function> f) { - - AnyMValue> mapped = run.map(o -> Mono.from(o.flatMap(f))); + final AnyMValue> mapped = run.map(o -> Mono.from(o.flatMap(f))); return of(narrow(mapped)); } @@ -236,7 +278,7 @@ public MonoTValue flatMap(Function Function, MonoTValue> lift(Function fn) { + public static Function, MonoTValue> lift(final Function fn) { return optTu -> optTu.map(input -> fn.apply(input)); } @@ -251,7 +293,7 @@ public static Function, MonoTValue> lift(Function BiFunction, MonoTValue, MonoTValue> lift2( - BiFunction fn) { + final BiFunction fn) { return (optTu1, optTu2) -> optTu1.flatMapT(input1 -> optTu2.map(input2 -> fn.apply(input1, input2))); } @@ -262,7 +304,7 @@ public static BiFunction, MonoTValue, MonoTValue< * @param anyM AnyM that doesn't contain a monad wrapping an CompletableFuture * @return CompletableFutureT */ - public static MonoTValue fromAnyM(AnyMValue anyM) { + public static MonoTValue fromAnyM(final AnyMValue anyM) { return of(anyM.map(Mono::just)); } @@ -272,26 +314,28 @@ public static MonoTValue fromAnyM(AnyMValue anyM) { * @param monads AnyM that contains a monad wrapping an CompletableFuture * @return CompletableFutureT */ - public static MonoTValue of(AnyMValue> monads) { + public static MonoTValue of(final AnyMValue> monads) { return new MonoTValue<>( - monads); + monads); } - public static MonoTValue of(Mono monads) { + public static MonoTValue of(final Mono monads) { return MonoT.fromOptional(Optional.of(monads)); } - /* * (non-Javadoc) * * @see java.lang.Object#toString() */ + @Override public String toString() { return String.format("MonoTValue[%s]", run); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.util.function.Supplier#get() */ @Override @@ -300,60 +344,71 @@ public A get() { .block(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.reactor.transformer.MonoT#stream() */ @Override public ReactiveSeq stream() { val maybeEval = run.toMaybe(); return maybeEval.isPresent() ? Publishers.stream(maybeEval.get()) - + : ReactiveSeq.of(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.reactor.transformer.MonoT#iterator() */ @Override public Iterator iterator() { val maybeEval = run.toMaybe(); return maybeEval.isPresent() ? Monos.iterator(maybeEval.get()) - + : Arrays. asList() .iterator(); } - /* (non-Javadoc) - * @see org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber) + /* + * (non-Javadoc) + * + * @see + * org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber) */ @Override - public void subscribe(Subscriber s) { + public void subscribe(final Subscriber s) { run.toMaybe() .forEach(e -> e.subscribe(s)); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Value#test(java.lang.Object) */ @Override - public boolean test(A t) { + public boolean test(final A t) { val maybeEval = run.toMaybe(); - return maybeEval.isPresent() ? Monos.test(maybeEval.get(),t) - : false; + return maybeEval.isPresent() ? Monos.test(maybeEval.get(), t) : false; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Unit#unit(java.lang.Object) */ @Override - public MonoTValue unit(R value) { + public MonoTValue unit(final R value) { return of(run.unit(Mono.just(value))); } - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see com.aol.cyclops.reactor.transformer.MonoT#empty() */ @Override @@ -361,51 +416,66 @@ public MonoTValue empty() { return of(run.unit(Mono.empty())); } - - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Functor#cast(java.lang.Class) */ @Override - public MonoTValue cast(Class type) { + public MonoTValue cast(final Class type) { return (MonoTValue) TransformerValue.super.cast(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.types.Functor#trampoline(java.util.function.Function) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.types.Functor#trampoline(java.util.function.Function) */ @Override - public MonoTValue trampoline(Function> mapper) { + public MonoTValue trampoline(final Function> mapper) { return (MonoTValue) TransformerValue.super.trampoline(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.types.Functor#patternMatch(java.util.function.Function, java.util.function.Supplier) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.types.Functor#patternMatch(java.util.function.Function, + * java.util.function.Supplier) */ @Override - public MonoTValue patternMatch(Function, CheckValue1> case1, Supplier otherwise) { + public MonoTValue patternMatch(final Function, CheckValue1> case1, + final Supplier otherwise) { return (MonoTValue) TransformerValue.super.patternMatch(case1, otherwise); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Filterable#ofType(java.lang.Class) */ @Override - public MonoTValue ofType(Class type) { + public MonoTValue ofType(final Class type) { return (MonoTValue) MonoT.super.ofType(type); } - /* (non-Javadoc) - * @see com.aol.cyclops.types.Filterable#filterNot(java.util.function.Predicate) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.types.Filterable#filterNot(java.util.function.Predicate) */ @Override - public MonoTValue filterNot(Predicate fn) { + public MonoTValue filterNot(final Predicate fn) { return (MonoTValue) MonoT.super.filterNot(fn); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.types.Filterable#notNull() */ @Override @@ -413,40 +483,55 @@ public MonoTValue notNull() { return (MonoTValue) MonoT.super.notNull(); } - - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.transformer.MonoT#bind(java.util.function.Function) + + /* + * (non-Javadoc) + * + * @see com.aol.cyclops.reactor.transformer.MonoT#bind(java.util.function. + * Function) */ @Override - public MonoTValue bind(Function> f) { - return (MonoTValue)MonoT.super.bind(f); + public MonoTValue bind(final Function> f) { + return (MonoTValue) MonoT.super.bind(f); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see com.aol.cyclops.reactor.transformer.MonoT#nest() */ @Override public MonoTValue> nest() { - return (MonoTValue>)MonoT.super.nest(); + return (MonoTValue>) MonadicValue1.super.nest(); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.transformer.MonoT#coflatMap(java.util.function.Function) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.transformer.MonoT#coflatMap(java.util.function. + * Function) */ @Override - public MonoTValue coflatMap(Function, R> mapper) { - return (MonoTValue)MonoT.super.coflatMap(mapper); + public MonoTValue coflatMap(final Function, R> mapper) { + return (MonoTValue) MonadicValue1.super.coflatMap(mapper); } - /* (non-Javadoc) - * @see com.aol.cyclops.reactor.transformer.MonoT#combineEager(com.aol.cyclops.Monoid, com.aol.cyclops.types.MonadicValue) + /* + * (non-Javadoc) + * + * @see + * com.aol.cyclops.reactor.transformer.MonoT#combineEager(com.aol.cyclops. + * Monoid, com.aol.cyclops.types.MonadicValue) */ @Override - public MonoTValue combineEager(Monoid monoid, MonadicValue v2) { - return (MonoTValue)MonoT.super.combineEager(monoid, v2); + public MonoTValue combineEager(final Monoid monoid, final MonadicValue v2) { + return (MonoTValue) MonadicValue1.super.combineEager(monoid, v2); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ @Override @@ -454,11 +539,13 @@ public int hashCode() { return run.hashCode(); } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#equals(java.lang.Object) */ @Override - public boolean equals(Object o) { + public boolean equals(final Object o) { if (o instanceof MonoTValue) { return run.equals(((MonoTValue) o).run); } diff --git a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/types/ReactorConvertable.java b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/types/ReactorConvertable.java index 292ab3e0..c3fe3700 100644 --- a/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/types/ReactorConvertable.java +++ b/cyclops-reactor/src/main/java/com/aol/cyclops/reactor/types/ReactorConvertable.java @@ -11,22 +11,21 @@ * @param type of elements contained */ public interface ReactorConvertable { - + /** * Convert this type to a Reactor Flux * * @return Reactor Flux */ Flux flux(); - + /** * Convert this type to a Reactor Mono * * @return Reactor Mono */ - default Mono mono(){ - return Mono.from(flux()); - } - + default Mono mono() { + return Mono.from(flux()); + } }