(Function<List<A>, List<B>> function, List<A> source)
| 197 | } |
| 198 | |
| 199 | static <A, B> List<B> convert(Function<List<A>, List<B>> function, List<A> source) { |
| 200 | List<B> dest = function.apply(source); |
| 201 | if (dest.size() != source.size()) { |
| 202 | throw new IllegalStateException("Invalid Function " + function |
| 203 | + " changed return size. This is not supported."); |
| 204 | } |
| 205 | return dest; |
| 206 | } |
| 207 | |
| 208 | // Since we currently rely on implementation details of two implementations, |
| 209 | // prevent external subclassing, except through exposed subclasses |
no test coverage detected