public class DataGrid<T> extends CloneSupport<DataGrid<T>> implements Serializable, IJsonObject, Iterable<T>
Constructor and Description |
---|
DataGrid() |
DataGrid(List<T> rows) |
DataGrid(List<T> rows,
int total) |
DataGrid(Pager<T> pager) |
Modifier and Type | Method and Description |
---|---|
DataGrid<T> |
addRow(T row)
添加结果
|
DataGrid<T> |
addRows(List<T> rows)
添加结果
|
void |
forEach(Consumer<? super T> action) |
int |
getLimit() |
int |
getPage() |
int |
getPages() |
List<T> |
getRows() |
int |
getSize() |
int |
getTotal() |
boolean |
hasNextPage()
是否还有下一页
|
boolean |
isEmpty() |
boolean |
isNotEmpty() |
Iterator<T> |
iterator() |
<E> DataGrid<E> |
map(Function<T,E> mapping)
映射
|
static <T> DataGrid<T> |
of() |
static <T> DataGrid<T> |
of(List<T> rows) |
static <T> DataGrid<T> |
of(List<T> rows,
int total) |
static <T> DataGrid<T> |
of(Pager<T> pager) |
DataGrid<T> |
resetPages()
重新设置总页数
|
void |
setLimit(int limit) |
void |
setPage(int page) |
void |
setPages(int pages) |
void |
setRows(List<T> rows)
设置结果
|
void |
setSize(int size) |
void |
setTotal(int total) |
Spliterator<T> |
spliterator() |
Stream<T> |
stream() |
String |
toString() |
clone
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toJsonString
public static <T> DataGrid<T> of()
public int getTotal()
public void setTotal(int total)
public int getPage()
public void setPage(int page)
public int getLimit()
public void setLimit(int limit)
public int getPages()
public void setPages(int pages)
public int getSize()
public void setSize(int size)
public boolean hasNextPage()
public boolean isEmpty()
public boolean isNotEmpty()
public <E> DataGrid<E> map(Function<T,E> mapping)
E
- Emapping
- mappingpublic Spliterator<T> spliterator()
spliterator
in interface Iterable<T>
Copyright © 2024. All rights reserved.