Skip to content

Commit 6449b84

Browse files
authored
Merge pull request #227 from aol/javadoc-rx
Javadoc rx
2 parents 7f503a4 + ad7951c commit 6449b84

File tree

15 files changed

+355
-152
lines changed

15 files changed

+355
-152
lines changed

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ test {
2121
}
2222

2323

24+
2425
subprojects {
2526
apply plugin: 'eclipse'
2627

@@ -32,7 +33,7 @@ subprojects {
3233
}
3334
}
3435
}
35-
36+
3637

3738

3839
}

cyclops-reactor/build.gradle

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,29 @@ jar {
2222
}
2323
}
2424

25+
26+
27+
28+
if (JavaVersion.current().isJava8Compatible()) {
29+
allprojects {
30+
tasks.withType(Javadoc) {
31+
options.addStringOption('Xdoclint:none', '-quiet')
32+
}
33+
}
34+
}
35+
2536
repositories {
2637
mavenCentral()
2738

2839
}
2940
configurations {
3041
provided
42+
doc {
43+
transitive false
44+
}
3145
}
3246
dependencies {
47+
doc 'com.aol.simplereact:cyclops-react:'+cyclopsReactVersion+':sources'
3348
compile 'io.projectreactor:reactor-core:'+reactorVersion
3449
compile group: 'com.aol.simplereact', name:'cyclops-react', version:cyclopsReactVersion
3550
provided group: 'org.projectlombok', name: 'lombok', version:lombokVersion
@@ -51,7 +66,11 @@ eclipse.classpath.plusConfigurations += [configurations.provided] // Eclipse us
5166
test {
5267
systemProperties 'property': 'value'
5368
}
54-
69+
javadoc {
70+
source configurations.doc.collect { zipTree(it) }
71+
include '**/*.java'
72+
options.addStringOption('Xdoclint:none', '-quiet')
73+
}
5574

5675

5776
modifyPom {

cyclops-reactor/src/main/java/com/aol/cyclops/reactor/Fluxes.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ public static <T1, T2, R1, R2, R> Flux<R> forEach3(Flux<? extends T1> value1,
253253
* @param yieldingFunction Generates a result per combination
254254
* @return
255255
*/
256-
public static <T, R1, R> Flux<R> forEach(Flux<? extends T> value1,
257-
Function<? super T, Flux<R1>> value2,
256+
public static <T, R1, R> Flux<R> forEach(Flux<? extends T> value1, Function<? super T, Flux<R1>> value2,
258257
BiFunction<? super T, ? super R1, ? extends R> yieldingFunction) {
259258

260259
return AnyM.ofSeq(For.anyM(anyM(value1))
@@ -1144,7 +1143,7 @@ public T next() {
11441143

11451144
});
11461145
}
1147-
1146+
11481147
/**
11491148
* Apply the identity function / combiner from left to right accumulating partial results in the resulting Flux
11501149
*
@@ -1165,7 +1164,7 @@ public T next() {
11651164
*/
11661165
public static <T, U> Flux<U> scanRight(Flux<T> flux, U identity,
11671166
BiFunction<? super T, ? super U, ? extends U> combiner) {
1168-
1167+
11691168
return Flux.fromIterable(() -> new Iterator<U>() {
11701169

11711170
Iterator<U> it;
@@ -1331,6 +1330,7 @@ public T next() {
13311330

13321331
});
13331332
}
1333+
13341334
/**
13351335
* Create a sliding view over this Sequence
13361336
*
@@ -1379,7 +1379,7 @@ public ListX<T> next() {
13791379

13801380
});
13811381
}
1382-
1382+
13831383
/**
13841384
* Group elements in a Flux
13851385
* <pre>
@@ -1515,7 +1515,7 @@ public static <T> Flux<Tuple2<T, Long>> zipWithIndex(Flux<T> stream) {
15151515
return stream.zipWith(ReactiveSeq.rangeLong(0, Long.MAX_VALUE), Tuple::tuple);
15161516
}
15171517

1518-
/**
1518+
/**
15191519
* Delete elements between given indexes in a Flux
15201520
* <pre>
15211521
* {@code
@@ -1563,7 +1563,6 @@ public static final <T> Flux<T> insertAt(final Flux<T> stream, final int pos, fi
15631563

15641564
}
15651565

1566-
15671566
/**
15681567
* Create Flux of ListX where
15691568
* each ListX is populated while the supplied bipredicate holds. The
@@ -1584,7 +1583,7 @@ public static final <T> Flux<T> insertAt(final Flux<T> stream, final int pos, fi
15841583
*/
15851584
public final static <T> Flux<ListX<T>> groupedStatefullyUntil(final Flux<T> flux,
15861585
final BiPredicate<ListX<? super T>, ? super T> predicate) {
1587-
1586+
15881587
return Flux.fromIterable(() -> new Iterator<ListX<T>>() {
15891588

15901589
Iterator<ListX<T>> it;

cyclops-reactor/src/main/java/com/aol/cyclops/reactor/comprehenders/FluxTValueComprehender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public Class getTargetClass() {
5151
}
5252

5353
@Override
54-
public FluxTValue fromIterator(Iterator o) {
54+
public FluxTValue fromIterator(Iterator o) {
5555
Mono<Flux<Object>> mono = Mono.just(Flux.fromIterable(() -> o));
5656
return FluxT.fromMono(mono);
5757
}

cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ public static <A> FluxTSeq<A> fromIterable(Iterable<Flux<A>> iterableOfFluxs) {
265265
return FluxTSeq.of(AnyM.fromIterable(iterableOfFluxs));
266266
}
267267

268-
269-
270268
/**
271269
* Create a FluxTSeq from a Publisher that contains nested Fluxes
272270
*
@@ -324,6 +322,7 @@ public static <A> FluxTValue<A> fromOptional(Optional<Flux<A>> optional) {
324322
public static <A> FluxTValue<A> fromFuture(CompletableFuture<Flux<A>> future) {
325323
return FluxTValue.of(AnyM.fromCompletableFuture(future));
326324
}
325+
327326
/**
328327
* Create a FluxTValue from a Reactor Mono type that contains nested Fluxes
329328
* <pre>
@@ -352,7 +351,7 @@ public static <A> FluxTValue<A> fromMono(Mono<Flux<A>> mono) {
352351
public static <A> FluxTValue<A> fromIterableValue(Iterable<Flux<A>> iterableOfFluxs) {
353352
return FluxTValue.of(AnyM.fromIterableValue(iterableOfFluxs));
354353
}
355-
354+
356355
/**
357356
* @return An empty FluxValue (wraps an Empty Optional)
358357
*/
@@ -1123,5 +1122,4 @@ default <U extends Comparable<? super U>> FluxT<T> sorted(Function<? super T, ?
11231122
return (FluxT) FoldableTransformerSeq.super.sorted(function);
11241123
}
11251124

1126-
11271125
}

cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/FluxTSeq.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ public FluxTSeq<T> filter(Predicate<? super T> test) {
105105
*
106106
* <pre>
107107
* {@code
108-
* FluxT.of(AnyM.fromStream(Arrays.asStream(Flux.just(10)))
108+
* FluxT.of(AnyM.fromStream(Stream.of(Flux.just(10)))
109109
* .map(t->t=t+1);
110110
*
111111
*
112-
* //FluxT<AnyM<Stream<Stream[11]>>>
112+
* //FluxT<11>>
113113
* }
114114
* </pre>
115115
*
@@ -180,10 +180,10 @@ public static <A> FluxTSeq<A> fromAnyM(AnyMSeq<A> anyM) {
180180
}
181181

182182
/**
183-
* Create a FluxT from an AnyM that wraps a monad containing a Stream
183+
* Create a FluxT from an AnyM that wraps a monad containing a Flux
184184
*
185-
* @param monads
186-
* @return
185+
* @param monads AnyM that wraps a Flux containing monad
186+
* @return FluxTSeq
187187
*/
188188
public static <A> FluxTSeq<A> of(AnyMSeq<? extends Flux<A>> monads) {
189189
return new FluxTSeq<>(

cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ public static <A> MonoTSeq<A> fromStream(Stream<Mono<A>> streamOfMonos) {
236236
return MonoTSeq.of(AnyM.fromStream(streamOfMonos));
237237
}
238238

239-
240239
/**
241240
* Construct a MonoTSeq from a Publisher containing Monos
242241
*
@@ -294,6 +293,7 @@ public static <A> MonoTValue<A> fromOptional(Optional<Mono<A>> optional) {
294293
public static <A> MonoTValue<A> fromFuture(CompletableFuture<Mono<A>> future) {
295294
return MonoTValue.of(AnyM.fromCompletableFuture(future));
296295
}
296+
297297
/**
298298
* Construct a MonoTValue from a Mono containing a Mono
299299
* <pre>

cyclops-reactor/src/main/java/com/aol/cyclops/reactor/transformer/MonoTSeq.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ public boolean isSeqPresent() {
312312
return !run.isEmpty();
313313
}
314314

315-
316315
/*
317316
* (non-Javadoc)
318317
*

cyclops-rx/src/main/java/com/aol/cyclops/rx/ObservableTs.java

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
@UtilityClass
2727
public class ObservableTs {
28-
28+
2929
/**
3030
* Construct an AnyM type from an Observable Transformer. This allows the Observable Transformer to be manipulated according to a standard interface
3131
* along with a vast array of other Java Monad implementations
@@ -46,6 +46,7 @@ public class ObservableTs {
4646
public static <T> AnyMSeq<T> anyM(ObservableT<T> obs) {
4747
return AnyM.ofSeq(obs);
4848
}
49+
4950
/**
5051
* Construct an ObservableT from a Publisher containing nested Observables
5152
*
@@ -55,6 +56,7 @@ public static <T> AnyMSeq<T> anyM(ObservableT<T> obs) {
5556
public static <T> ObservableTSeq<T> observableT(Publisher<Observable<T>> nested) {
5657
return ObservableT.fromPublisher(nested);
5758
}
59+
5860
/**
5961
* Construct an ObservableT from an Observable containing nested Observables
6062
*
@@ -106,13 +108,14 @@ public static <T1, T2, T3, R1, R2, R3, R> ObservableT<R> forEach4(ObservableT<?
106108

107109
return AnyM.ofSeq(For.anyM(anyM(value1))
108110
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
109-
.anyM(a -> b -> AnyM.fromPublisher(value3.apply(a, b)))
110-
.anyM(a -> b -> c -> AnyM.fromPublisher(value4.apply(a, b, c)))
111+
.anyM(a -> b -> AnyM.fromPublisher(value3.apply(a, b)))
112+
.anyM(a -> b -> c -> AnyM.fromPublisher(value4.apply(a, b, c)))
111113
.yield4(yieldingFunction)
112114
.unwrap())
113115
.unwrap();
114116

115117
}
118+
116119
/**
117120
* Perform a For Comprehension over an ObservableT, accepting 3 generating functions.
118121
* This results in a four level nested internal iteration over the provided Publishers.
@@ -153,15 +156,16 @@ public static <T1, T2, T3, R1, R2, R3, R> ObservableT<R> forEach4(ObservableT<?
153156
QuadFunction<? super T1, ? super R1, ? super R2, ? super R3, ? extends R> yieldingFunction) {
154157

155158
return AnyM.ofSeq(For.anyM(anyM(value1))
156-
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
157-
.anyM(a -> b -> AnyM.fromPublisher(value3.apply(a, b)))
158-
.anyM(a -> b -> c -> AnyM.fromPublisher(value4.apply(a, b, c)))
159+
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
160+
.anyM(a -> b -> AnyM.fromPublisher(value3.apply(a, b)))
161+
.anyM(a -> b -> c -> AnyM.fromPublisher(value4.apply(a, b, c)))
159162
.filter(a -> b -> c -> d -> filterFunction.apply(a, b, c, d))
160163
.yield4(yieldingFunction)
161164
.unwrap())
162165
.unwrap();
163166

164167
}
168+
165169
/**
166170
* Perform a For Comprehension over a ObservableT, accepting 2 generating functions.
167171
* This results in a three level nested internal iteration over the provided Publishers.
@@ -196,8 +200,8 @@ public static <T1, T2, R1, R2, R> ObservableT<R> forEach3(ObservableT<? extends
196200
TriFunction<? super T1, ? super R1, ? super R2, ? extends R> yieldingFunction) {
197201

198202
return AnyM.ofSeq(For.anyM(anyM(value1))
199-
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
200-
.anyM(a -> b -> AnyM.fromPublisher(value3.apply(a, b)))
203+
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
204+
.anyM(a -> b -> AnyM.fromPublisher(value3.apply(a, b)))
201205
.yield3(yieldingFunction)
202206
.unwrap())
203207
.unwrap();
@@ -239,14 +243,15 @@ public static <T1, T2, R1, R2, R> ObservableT<R> forEach3(ObservableT<? extends
239243
TriFunction<? super T1, ? super R1, ? super R2, ? extends R> yieldingFunction) {
240244

241245
return AnyM.ofSeq(For.anyM(anyM(value1))
242-
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
243-
.anyM(a -> b -> AnyM.fromPublisher(value3.apply(a, b)))
246+
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
247+
.anyM(a -> b -> AnyM.fromPublisher(value3.apply(a, b)))
244248
.filter(a -> b -> c -> filterFunction.apply(a, b, c))
245249
.yield3(yieldingFunction)
246250
.unwrap())
247251
.unwrap();
248252

249253
}
254+
250255
/**
251256
* Perform a For Comprehension over a ObservableT, accepting a generating function.
252257
* This results in a two level nested internal iteration over the provided Publishers.
@@ -278,12 +283,13 @@ public static <T, R1, R> ObservableT<R> forEach(ObservableT<? extends T> value1,
278283
BiFunction<? super T, ? super R1, ? extends R> yieldingFunction) {
279284

280285
return AnyM.ofSeq(For.anyM(anyM(value1))
281-
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
286+
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
282287
.yield2(yieldingFunction)
283288
.unwrap())
284289
.unwrap();
285290

286291
}
292+
287293
/**
288294
* Perform a For Comprehension over an ObservableT, accepting a generating function.
289295
* This results in a two level nested internal iteration over the provided Publishers.
@@ -317,7 +323,7 @@ public static <T, R1, R> ObservableT<R> forEach(ObservableT<? extends T> value1,
317323
BiFunction<? super T, ? super R1, ? extends R> yieldingFunction) {
318324

319325
return AnyM.ofSeq(For.anyM(anyM(value1))
320-
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
326+
.anyM(a -> AnyM.fromPublisher(value2.apply(a)))
321327
.filter(a -> b -> filterFunction.apply(a, b))
322328
.yield2(yieldingFunction)
323329
.unwrap())

0 commit comments

Comments
 (0)