Package io.rocketbase.commons.dto
Class PageableResult<E>
- java.lang.Object
-
- io.rocketbase.commons.dto.PageableResult<E>
-
- All Implemented Interfaces:
Serializable,Iterable<E>
public class PageableResult<E> extends Object implements Iterable<E>, Serializable
wrapping object for paged result lists- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PageableResult()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E> PageableResult<E>content(List<E> content)static <E> PageableResult<E>contentPage(List<E> content, org.springframework.data.domain.Page page)booleanhasNextPage()booleanhasPreviousPage()Iterator<E>iterator()<U> PageableResult<U>map(Function<? super E,? extends U> converter)Returns a newPageableResultwith the content of the current one mapped by the givenConverter.static <E> PageableResult<E>page(org.springframework.data.domain.Page<E> page)org.springframework.data.domain.Page<E>toPage()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
contentPage
public static <E> PageableResult<E> contentPage(List<E> content, org.springframework.data.domain.Page page)
-
page
public static <E> PageableResult<E> page(org.springframework.data.domain.Page<E> page)
-
content
public static <E> PageableResult<E> content(List<E> content)
-
hasNextPage
public boolean hasNextPage()
-
hasPreviousPage
public boolean hasPreviousPage()
-
toPage
public org.springframework.data.domain.Page<E> toPage()
-
map
public <U> PageableResult<U> map(Function<? super E,? extends U> converter)
Returns a newPageableResultwith the content of the current one mapped by the givenConverter.- Parameters:
converter- must not be null.
-
-