These help build a single JSON Object from a collection, using a mapper function @param collection Collection to apply to @param mapper Mapper to apply @param Element Type @return Map
(E[] collection, Function<E, JSONPair> mapper)
| 95 | * @return Map |
| 96 | */ |
| 97 | public static <E> Map toObjectMapper(E[] collection, Function<E, JSONPair> mapper) { |
| 98 | return toObjectMapper(Lists.newArrayList(collection), mapper); |
| 99 | } |
| 100 | |
| 101 | public static <E> Map toObjectMapper(Iterable<E> collection, Function<E, JSONPair> mapper) { |
| 102 | Map object = Maps.newLinkedHashMap(); |