- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<HalData>
-
- org.refcodes.hal.HalDataPageImpl
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<HalData>
,Collection<HalData>
,List<HalData>
,RandomAccess
,HalDataPage
public class HalDataPageImpl extends ArrayList<HalData> implements HalDataPage
Implementation of theHalDataPage
interface.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
Fields inherited from interface org.refcodes.hal.HalDataPage
PAGE_COUNT, PAGE_NUMBER, PAGE_SIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HalDataPageImpl()
Default constructor for usage by sub-classes.HalDataPageImpl(int aPageNumber, int aPageSize, int aPageCount)
Constructs theHalDataPage
instances with the given pagination metrics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPageCount()
Returns the total number of the pages which are available for retrieval.int
getPageNumber()
Returns the number of the page which thisHalDataPage
instances represents.int
getPageSize()
Returns the maximum size of the page being requested for theHalDataPage
result set.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Constructor Detail
-
HalDataPageImpl
protected HalDataPageImpl()
Default constructor for usage by sub-classes.
-
HalDataPageImpl
public HalDataPageImpl(int aPageNumber, int aPageSize, int aPageCount)
Constructs theHalDataPage
instances with the given pagination metrics.- Parameters:
aPageNumber
- The page's number as of pagination.aPageSize
- The page's size as of pagination.aPageCount
- The total page count of the overall result set.
-
-
Method Detail
-
getPageNumber
public int getPageNumber()
Returns the number of the page which thisHalDataPage
instances represents.- Specified by:
getPageNumber
in interfaceHalDataPage
- Returns:
- The
HalDataPage
result set's page number as of pagination.
-
getPageSize
public int getPageSize()
Returns the maximum size of the page being requested for theHalDataPage
result set. Returns -1 in case no page size has been specified.- Specified by:
getPageSize
in interfaceHalDataPage
- Returns:
- The
HalDataPage
result set's page size as of pagination.
-
getPageCount
public int getPageCount()
Returns the total number of the pages which are available for retrieval.- Specified by:
getPageCount
in interfaceHalDataPage
- Returns:
- The total number of the pages repesenting the overall result set..
-
-