R
- type of the page request.D
- type of the data.public class Page<R extends PageRequest,D> extends Object implements Serializable
Note: D is not forced to be serializable, so in order to properly serialize a Page the type of data must be serializable. D was not marked as Serializable on purpose so the page can hold non serializable objects.
Constructor and Description |
---|
Page(R pageRequest,
List<D> data)
Creates a data page.
|
Modifier and Type | Method and Description |
---|---|
List<D> |
getData()
Gets the page data.
|
R |
getRequest()
Gets the request that generated this page.
|
boolean |
isEmpty()
Returns
true if the page is empty, false otherwise. |
String |
toString() |
public R getRequest()
public boolean isEmpty()
true
if the page is empty, false
otherwise.true
if the page is empty, false
otherwise.Copyright © 2016. All Rights Reserved.