001package ch.powerunit.collector.lang;
002
003import java.util.List;
004import java.util.stream.Stream;
005
006/**
007 * DSL step of the builder of {@link java.util.stream.Collector Collector
008 * tester}.
009 * 
010 * @author borettim
011 * @param <T>
012 *            the input type of the {@link java.util.stream.Collector Collector}
013 *            .
014 * @param <A>
015 *            the accumulator type of the {@link java.util.stream.Collector
016 *            Collector}.
017 * @param <R>
018 *            the return type of the {@link java.util.stream.Collector
019 *            Collector}.
020 * @since 0.4.0
021 */
022public interface CollectorTesterDSL3<T, A, R> {
023        /**
024         * Specify a sample input Stream to be used to test the
025         * {@link java.util.stream.Collector Collector}.
026         * 
027         * @param input
028         *            the sample input.
029         * @return {@link CollectorTesterDSL2 the next step of the DSL}
030         */
031        CollectorTesterDSL2<T, A, R> withInput(Stream<T> input);
032
033        /**
034         * Specify a sample input List that will be transformed as stream and be
035         * used as a sample to test the {@link java.util.stream.Collector Collector}
036         * .
037         * 
038         * @param input
039         *            the sample input.
040         * @return {@link CollectorTesterDSL2 the next step of the DSL}
041         */
042        CollectorTesterDSL2<T, A, R> withStreamFromList(List<T> input);
043
044        /**
045         * Specify a sample input List that will be transformed as parallelStream
046         * and be used as a sample to test the {@link java.util.stream.Collector
047         * Collector}.
048         * 
049         * @param input
050         *            the sample input.
051         * @return {@link CollectorTesterDSL2 the next step of the DSL}
052         */
053        CollectorTesterDSL2<T, A, R> withParallelStreamFromList(List<T> input);
054
055        /**
056         * Specify a sample input array that will be transformed as stream and be
057         * used as a sample to test the {@link java.util.stream.Collector Collector}
058         * .
059         * 
060         * @param input
061         *            the sample input.
062         * @return {@link CollectorTesterDSL2 the next step of the DSL}
063         */
064        CollectorTesterDSL2<T, A, R> withStreamFromArray(T... input);
065
066        /**
067         * Specify a sample input array that will be transformed as stream and be
068         * used as a sample to test the {@link java.util.stream.Collector Collector}
069         * .
070         * 
071         * @param first
072         *            the first input.
073         * @return {@link CollectorTesterDSL2 the next step of the DSL}
074         */
075        CollectorTesterDSL2<T, A, R> withStreamFromArray(T first);
076
077        /**
078         * Specify a sample input array that will be transformed as stream and be
079         * used as a sample to test the {@link java.util.stream.Collector Collector}
080         * .
081         * 
082         * @param first
083         *            the first input.
084         * @param second
085         *            the second input.
086         * @return {@link CollectorTesterDSL2 the next step of the DSL}
087         */
088        CollectorTesterDSL2<T, A, R> withStreamFromArray(T first, T second);
089
090        /**
091         * Specify a sample input array that will be transformed as stream and be
092         * used as a sample to test the {@link java.util.stream.Collector Collector}
093         * .
094         * 
095         * @param first
096         *            the first input.
097         * @param second
098         *            the second input.
099         * @param third
100         *            the third input.
101         * @return {@link CollectorTesterDSL2 the next step of the DSL}
102         */
103        CollectorTesterDSL2<T, A, R> withStreamFromArray(T first, T second, T third);
104
105        /**
106         * Specify a sample input array that will be transformed as stream and be
107         * used as a sample to test the {@link java.util.stream.Collector Collector}
108         * .
109         * 
110         * @param first
111         *            the first input.
112         * @param second
113         *            the second input.
114         * @param third
115         *            the third input.
116         * @param fourth
117         *            the fourth input.
118         * @return {@link CollectorTesterDSL2 the next step of the DSL}
119         */
120        CollectorTesterDSL2<T, A, R> withStreamFromArray(T first, T second,
121                        T third, T fourth);
122
123        /**
124         * Specify a sample input array that will be transformed as stream and be
125         * used as a sample to test the {@link java.util.stream.Collector Collector}
126         * .
127         * 
128         * @param first
129         *            the first input.
130         * @param second
131         *            the second input.
132         * @param third
133         *            the third input.
134         * @param fourth
135         *            the fourth input.
136         * @param fifth
137         *            the fifth input.
138         * @return {@link CollectorTesterDSL2 the next step of the DSL}
139         */
140        CollectorTesterDSL2<T, A, R> withStreamFromArray(T first, T second,
141                        T third, T fourth, T fifth);
142
143}