These help build a single JSON array using a mapper function @param collection Collection to apply to @param mapper Mapper to apply @param Element Type @return List
(E[] collection, Function<E, Object> mapper)
| 72 | * @return List |
| 73 | */ |
| 74 | public static <E> List toArrayMapper(E[] collection, Function<E, Object> mapper) { |
| 75 | return toArrayMapper(Lists.newArrayList(collection), mapper); |
| 76 | } |
| 77 | |
| 78 | public static <E> List toArrayMapper(Iterable<E> collection, Function<E, Object> mapper) { |
| 79 | List array = Lists.newArrayList(); |