-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathPage.java
More file actions
53 lines (45 loc) · 902 Bytes
/
Page.java
File metadata and controls
53 lines (45 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.icoderman.woocommerce;
import java.util.List;
public class Page<T> {
/**
* List of element.
*/
private List<T> content;
/**
* Total number of element.
*/
private int total;
/**
* Total number of pages.
*/
private int totalPages;
/**
* Size of the current page.
*/
private int size;
/**
* Create new page of element.
* @param content Content list
* @param total total number of element.
* @param totalPages total number of pages.
* @param size size of the current result.
*/
public Page(List<T> content, int total, int totalPages, int size) {
this.content = content;
this.total = total;
this.totalPages = totalPages;
this.size = size;
}
public List<T> getContent() {
return content;
}
public int getTotal() {
return total;
}
public int getTotalPages() {
return totalPages;
}
public int getSize() {
return size;
}
}