public final class Paging
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private int |
count |
(package private) static java.lang.String |
COUNT |
private long |
maxId |
private static HttpParameter[] |
NULL_PARAMETER_ARRAY |
private static java.util.List<HttpParameter> |
NULL_PARAMETER_LIST |
private int |
page |
(package private) static java.lang.String |
PER_PAGE |
(package private) static char[] |
S |
private static long |
serialVersionUID |
private long |
sinceId |
(package private) static char[] |
SMCP |
Constructor and Description |
---|
Paging() |
Paging(int page) |
Paging(int page,
int count) |
Paging(int page,
int count,
long sinceId) |
Paging(int page,
int count,
long sinceId,
long maxId) |
Paging(int page,
long sinceId) |
Paging(long sinceId) |
Modifier and Type | Method and Description |
---|---|
private void |
addPostParameter(char[] supportedParams,
char paramKey,
java.util.List<HttpParameter> pagingParams,
java.lang.String paramName,
long paramValue) |
(package private) HttpParameter[] |
asPostParameterArray() |
(package private) HttpParameter[] |
asPostParameterArray(char[] supportedParams,
java.lang.String perPageParamName)
Converts the pagination parameters into a List of PostParameter.
This method also Validates the preset parameters, and throws IllegalStateException if any unsupported parameter is set. |
(package private) java.util.List<HttpParameter> |
asPostParameterList() |
(package private) java.util.List<HttpParameter> |
asPostParameterList(char[] supportedParams) |
(package private) java.util.List<HttpParameter> |
asPostParameterList(char[] supportedParams,
java.lang.String perPageParamName)
Converts the pagination parameters into a List of PostParameter.
This method also Validates the preset parameters, and throws IllegalStateException if any unsupported parameter is set. |
Paging |
count(int count) |
boolean |
equals(java.lang.Object o) |
int |
getCount() |
long |
getMaxId() |
int |
getPage() |
long |
getSinceId() |
int |
hashCode() |
Paging |
maxId(long maxId) |
void |
setCount(int count) |
void |
setMaxId(long maxId) |
void |
setPage(int page) |
void |
setSinceId(long sinceId) |
Paging |
sinceId(long sinceId) |
java.lang.String |
toString() |
private static final long serialVersionUID
private int page
private int count
private long sinceId
private long maxId
static final char[] S
static final char[] SMCP
static final java.lang.String COUNT
static final java.lang.String PER_PAGE
private static final HttpParameter[] NULL_PARAMETER_ARRAY
private static final java.util.List<HttpParameter> NULL_PARAMETER_LIST
public Paging()
public Paging(int page)
public Paging(long sinceId)
public Paging(int page, int count)
public Paging(int page, long sinceId)
public Paging(int page, int count, long sinceId)
public Paging(int page, int count, long sinceId, long maxId)
java.util.List<HttpParameter> asPostParameterList()
HttpParameter[] asPostParameterArray()
java.util.List<HttpParameter> asPostParameterList(char[] supportedParams)
java.util.List<HttpParameter> asPostParameterList(char[] supportedParams, java.lang.String perPageParamName)
supportedParams
- char array representation of supported parametersperPageParamName
- name used for per-page parameter. getUserListStatuses() requires "per_page" instead of "count".HttpParameter[] asPostParameterArray(char[] supportedParams, java.lang.String perPageParamName)
supportedParams
- char array representation of supported parametersperPageParamName
- name used for per-page parameter. getUserListStatuses() requires "per_page" instead of "count".private void addPostParameter(char[] supportedParams, char paramKey, java.util.List<HttpParameter> pagingParams, java.lang.String paramName, long paramValue)
public int getPage()
public void setPage(int page)
public int getCount()
public void setCount(int count)
public Paging count(int count)
public long getSinceId()
public void setSinceId(long sinceId)
public Paging sinceId(long sinceId)
public long getMaxId()
public void setMaxId(long maxId)
public Paging maxId(long maxId)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object