public class PageRange
extends java.lang.Object
Constructor and Description |
---|
PageRange(int from, int to)
Constructs a new
PageRange instance with given
from and
to ranges.
|
Modifier and Type | Method and Description |
---|---|
int |
getFrom()
Returns the number of the first page in range.
返回范围内第一页的编号。 |
int |
getTo()
Returns the number of the last page in range.
返回范围中的最后一页的编号。 |
java.lang.String |
toString() |
public PageRange(int from, int to)
PageRange
instance with given
from
and
to
ranges. The
from
and
to
can be equal when you need to specify a single page.
from
- number of the first page in range. Page number starts from 0. Cannot be negative.
-范围内第一页的编号。页码从0开始。不能为负。
to
- number of the last page in range. Cannot be negative or less than
from
.
-范围中最后一页的编号。不能为负数或小于。
java.lang.IllegalArgumentException
- when
from
and
to
< 0, or
from
>
to
.
public int getFrom()
public int getTo()
public java.lang.String toString()
toString
in class
java.lang.Object