| Class | Line # | Actions | |||||
|---|---|---|---|---|---|---|---|
| StreamOfTableFacetsProvider | 13 | 1 | 0% | 1 | 2 |
| 1 | package guru.mikelue.foxglove.functional; | |
| 2 | ||
| 3 | import java.util.List; | |
| 4 | import java.util.stream.Stream; | |
| 5 | ||
| 6 | import guru.mikelue.foxglove.TableFacet; | |
| 7 | ||
| 8 | /** | |
| 9 | * {@link Stream} alternative of {@link TableFacetsProvider}, | |
| 10 | * | |
| 11 | * @param <T> The type of table facet | |
| 12 | */ | |
| 13 | public interface StreamOfTableFacetsProvider<T extends TableFacet> extends TableFacetsProvider<T> { | |
| 14 | /** | |
| 15 | * Converts the stream of table facets to a list. | |
| 16 | * | |
| 17 | * @return A list of table facets | |
| 18 | */ | |
| 19 | 0 | @Override |
| 20 | default List<T> get() | |
| 21 | { | |
| 22 | 0 | return streamOf().toList(); |
| 23 | } | |
| 24 | ||
| 25 | /** | |
| 26 | * Provides a stream of {@link TableFacet} instances. | |
| 27 | * | |
| 28 | * @return A stream of table facets | |
| 29 | */ | |
| 30 | Stream<T> streamOf(); | |
| 31 | } |