@Test public void to_json() throws JsonProcessingException { Resources<Dummy> collection = Resources.of( Arrays.asList( new Dummy("1"), new Dummy("2") ), URI.create("http: ); assertResourceJson( mapper, object() .with("_self", "http: .with("resources", array() .with(object() .with("version", "1") .end()) .with(object() .with("version", "2") .end()) .end()) .end(), ObjectMapperFactory.create().valueToTree(collection) ); }
public static <R> Resources<R> of(Stream<R> resources, URI href) { return of(resources.collect(Collectors.toList()), href); }
Resources extends LinkContainer<Resources<T>> implements ViewSupplier { public static <R> Resources<R> of(Stream<R> resources, URI href) { return of(resources.collect(Collectors.toList()), href); } }
Resources extends LinkContainer<Resources<T>> implements ViewSupplier { public static <R> Resources<R> of(Stream<R> resources, URI href) { return of(resources.collect(Collectors.toList()), href); } protected  Resources(Collection<T> resources, URI self, Pagination pagination, Class<?> viewType); }
Resources extends LinkContainer<Resources<T>> implements ViewSupplier { public static <R> Resources<R> of(Stream<R> resources, URI href) { return of(resources.collect(Collectors.toList()), href); } protected  Resources(Collection<T> resources, URI self, Pagination pagination, Class<?> viewType); Resources<T> forView(Class<?> viewType); static Resources<R> of(Stream<R> resources, URI href); static Resources<R> of(Collection<R> resources, URI href); Resources<T> withPagination(Pagination pagination); Resources<V> transform(Function<T, V> fn); }
Resources extends LinkContainer<Resources<T>> implements ViewSupplier { public static <R> Resources<R> of(Stream<R> resources, URI href) { return of(resources.collect(Collectors.toList()), href); } protected  Resources(Collection<T> resources, URI self, Pagination pagination, Class<?> viewType); Resources<T> forView(Class<?> viewType); static Resources<R> of(Stream<R> resources, URI href); static Resources<R> of(Collection<R> resources, URI href); Resources<T> withPagination(Pagination pagination); Resources<V> transform(Function<T, V> fn);  }