- 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 theHalDataPageinterface.- 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 protectedHalDataPageImpl()Default constructor for usage by sub-classes.HalDataPageImpl(int aPageNumber, int aPageSize, int aPageCount)Constructs theHalDataPageinstances with the given pagination metrics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPageCount()Returns the total number of the pages which are available for retrieval.intgetPageNumber()Returns the number of the page which thisHalDataPageinstances represents.intgetPageSize()Returns the maximum size of the page being requested for theHalDataPageresult 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 theHalDataPageinstances 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 thisHalDataPageinstances represents.- Specified by:
getPageNumberin interfaceHalDataPage- Returns:
- The
HalDataPageresult set's page number as of pagination.
-
getPageSize
public int getPageSize()
Returns the maximum size of the page being requested for theHalDataPageresult set. Returns -1 in case no page size has been specified.- Specified by:
getPageSizein interfaceHalDataPage- Returns:
- The
HalDataPageresult 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:
getPageCountin interfaceHalDataPage- Returns:
- The total number of the pages repesenting the overall result set..
-
-