@@ -66,16 +66,16 @@ public static Continuation start(ContinuableRunnable o) {
6666 return Continuation .startWith (toRunnable (o ));
6767 }
6868
69- public static <T > ClosableIterator <T > iterate (Continuation continuation ) {
69+ public static <T > CloseableIterator <T > iterate (Continuation continuation ) {
7070 return iterate (continuation , false );
7171 }
7272
73- public static <T > ClosableIterator <T > iterate (Continuation continuation , boolean useCurrentValue ) {
73+ public static <T > CloseableIterator <T > iterate (Continuation continuation , boolean useCurrentValue ) {
7474 return new CoIterator <>(continuation , useCurrentValue );
7575 }
7676
7777
78- public static <T > ClosableIterator <T > iterate (ContinuableRunnable generator ) {
78+ public static <T > CloseableIterator <T > iterate (ContinuableRunnable generator ) {
7979 return iterate (create (generator ), false );
8080 }
8181
@@ -84,7 +84,7 @@ public static <T> Stream<T> stream(Continuation continuation) {
8484 }
8585
8686 public static <T > Stream <T > stream (Continuation continuation , boolean useCurrentValue ) {
87- ClosableIterator <T > iterator = iterate (continuation , useCurrentValue );
87+ CloseableIterator <T > iterator = iterate (continuation , useCurrentValue );
8888 return StreamSupport
8989 .stream (Spliterators .spliteratorUnknownSize (iterator , 0 ), false )
9090 .onClose (iterator ::close );
@@ -118,7 +118,7 @@ public static <T> void execute(Continuation continuation, Consumer<? super T> ac
118118 * @param action a non-continuable action to perform on the values yielded
119119 */
120120 public static <T > void execute (Continuation continuation , boolean useCurrentValue , Consumer <? super T > action ) {
121- try (ClosableIterator <T > iter = iterate (continuation , useCurrentValue )) {
121+ try (CloseableIterator <T > iter = iterate (continuation , useCurrentValue )) {
122122 while (iter .hasNext ()) {
123123 action .accept (iter .next ());
124124 }
@@ -161,7 +161,7 @@ public static <T> void execute(ContinuableRunnable generator, Consumer<? super T
161161 * @param action a continuable action to perform on the values yielded
162162 */
163163 public @ continuable static <T > void executeContinuable (Continuation continuation , boolean useCurrentValue , ContinuableConsumer <? super T > action ) {
164- try (ClosableIterator <T > iter = iterate (continuation , useCurrentValue )) {
164+ try (CloseableIterator <T > iter = iterate (continuation , useCurrentValue )) {
165165 forEach (iter , action );
166166 }
167167 }
@@ -205,7 +205,7 @@ public static <T> void execute(ContinuableRunnable generator, Consumer<? super T
205205 */
206206 public @ continuable static <T > void forEach (Iterable <T > iterable , ContinuableConsumer <? super T > action ) {
207207 Iterator <T > iter = iterable .iterator ();
208- try (ClosableIterator <T > closable = asClosable (iter )) {
208+ try (CloseableIterator <T > closeable = asCloseable (iter )) {
209209 forEach (iter , action );
210210 }
211211 }
@@ -227,8 +227,8 @@ public static <T> void execute(ContinuableRunnable generator, Consumer<? super T
227227 }
228228
229229 @ SuppressWarnings ("unchecked" )
230- private static <E > ClosableIterator <E > asClosable (Object o ) {
231- return o instanceof ClosableIterator ? (ClosableIterator <E >)o : null ;
230+ private static <E > CloseableIterator <E > asCloseable (Object o ) {
231+ return o instanceof CloseableIterator ? (CloseableIterator <E >)o : null ;
232232 }
233233
234234}
0 commit comments