public interface RepresentationModelAssembler<T,D extends RepresentationModel<?>>
RepresentationModel
.Modifier and Type | Method and Description |
---|---|
default CollectionModel<D> |
toCollectionModel(Iterable<? extends T> entities)
Converts an
Iterable or T s into an Iterable of RepresentationModel and wraps them
in a CollectionModel instance. |
D |
toModel(T entity)
Converts the given entity into a
D , which extends RepresentationModel . |
D toModel(T entity)
D
, which extends RepresentationModel
.entity
- default CollectionModel<D> toCollectionModel(Iterable<? extends T> entities)
Iterable
or T
s into an Iterable
of RepresentationModel
and wraps them
in a CollectionModel
instance.entities
- must not be null.CollectionModel
containing D
.Copyright © 2011–2020 Pivotal, Inc.. All rights reserved.