Returns a list that applies function to each element of fromList. The returned list is a transformed view of fromList; changes to fromList will be reflected in the returned list and vice versa. Since functions are not reversible, the transform is one-way and new i
(List<F> fromList, Function<? super F, ? extends T> function)
| 573 | |
| 574 | |
| 575 | public static <F, T> List<T> transform(List<F> fromList, Function<? super F, ? extends T> function) { |
| 576 | return (fromList instanceof RandomAccess) |
| 577 | ? new TransformingRandomAccessList<F, T>(fromList, function) |
| 578 | : new TransformingSequentialList<F, T>(fromList, function); |
| 579 | } |
| 580 | |
| 581 | /** |
| 582 | * Implementation of a sequential transforming list. |
no outgoing calls
no test coverage detected