Package graphql.annotations.connection
Class AbstractPaginatedData<T>
- java.lang.Object
-
- graphql.annotations.connection.AbstractPaginatedData<T>
-
- All Implemented Interfaces:
PaginatedData<T>,java.lang.Iterable<T>
- Direct Known Subclasses:
NaivePaginatedData
public abstract class AbstractPaginatedData<T> extends java.lang.Object implements PaginatedData<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractPaginatedData(boolean hasPreviousPage, boolean hasNextPage, java.lang.Iterable<T> data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNextPage()Whether or not this is the last pagebooleanhasPreviousPage()Whether or not this is the first pagejava.util.Iterator<T>iterator()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface graphql.annotations.connection.PaginatedData
getCursor
-
-
-
-
Constructor Detail
-
AbstractPaginatedData
public AbstractPaginatedData(boolean hasPreviousPage, boolean hasNextPage, java.lang.Iterable<T> data)
-
-
Method Detail
-
hasNextPage
public boolean hasNextPage()
Description copied from interface:PaginatedDataWhether or not this is the last page- Specified by:
hasNextPagein interfacePaginatedData<T>- Returns:
- true if there is a next page, false otherwise
-
hasPreviousPage
public boolean hasPreviousPage()
Description copied from interface:PaginatedDataWhether or not this is the first page- Specified by:
hasPreviousPagein interfacePaginatedData<T>- Returns:
- true if there is a previous page, false otherwise
-
-