Skip to content

Commit a9bf324

Browse files
authored
Remove .collectAsView, as this is served by Flows (#97)
1 parent d8c88d9 commit a9bf324

File tree

3 files changed

+0
-225
lines changed

3 files changed

+0
-225
lines changed

channels/src/main/java/com/softwaremill/jox/CollectSource.java

Lines changed: 0 additions & 113 deletions
This file was deleted.

channels/src/main/java/com/softwaremill/jox/Source.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,6 @@ public interface Source<T> extends CloseableChannel {
3636
*/
3737
<U> SelectClause<U> receiveClause(Function<T, U> callback);
3838

39-
//
40-
41-
/**
42-
* Creates a view of this source, where the results of {@link #receive()} will be transformed using the given function {@code f}.
43-
* If {@code f} returns {@code null}, the value will be skipped, and another value will be received.
44-
* <p>
45-
* The same logic applies to receive clauses created using this source, which can be used in {@link Select#select(SelectClause[])}.
46-
*
47-
* @param f The mapping / filtering function. If the function returns {@code null}, the value will be skipped.
48-
* @return A source which is a view of this source, with the mapping / filtering function applied.
49-
*/
50-
default <V> Source<V> collectAsView(Function<T, V> f) {
51-
return new CollectSource<>(this, f);
52-
}
53-
54-
/**
55-
* Creates a view of this source, where the results of {@link #receive()} will be filtered using the given predicate {@code p}.
56-
* <p>
57-
* The same logic applies to receive clauses created using this source, which can be used in {@link Select#select(SelectClause[])}.
58-
*
59-
* @param p The predicate to use for filtering.
60-
* @return A source which is a view of this source, with the filtering function applied.
61-
*/
62-
default Source<T> filterAsView(Predicate<T> p) {
63-
return new CollectSource<>(this, t -> p.test(t) ? t : null);
64-
}
65-
6639
// draining operations
6740

6841

channels/src/test/java/com/softwaremill/jox/CollectSourceTest.java

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)