R - Return type of the end resultT - The type of the Custom For Comprehension (the interface that extends
this one).public interface CustomForComprehension<R,T>
static interface Custom extends CustomForComprehension<Stream<Integer>,Custom>{
Integer myVar();
Custom myVar(List<Integer> value);
}
Stream<Integer> stream = ForComprehensions.foreachX(Custom.class,
c-> c.myVar(list)
.yield(()->c.myVar()+3)
);
| Modifier and Type | Method and Description |
|---|---|
T |
filter(java.util.function.Supplier<java.lang.Boolean> s) |
void |
run(java.lang.Runnable r) |
R |
yield(java.util.function.Supplier s) |