Package com.smartsheet.api.models
Class TokenPaginatedResult<T>
- java.lang.Object
-
- com.smartsheet.api.models.TokenPaginatedResult<T>
-
- Type Parameters:
T- the type of data contained in the paginated result
public class TokenPaginatedResult<T> extends java.lang.ObjectRepresents a generic token-based paginated result that can contain any type of data.
-
-
Constructor Summary
Constructors Constructor Description TokenPaginatedResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<T>getData()Gets the list of data items.java.lang.StringgetLastKey()Gets the token for retrieving the next page of results.booleanhasMorePages()Checks if there are more pages available.TokenPaginatedResult<T>setData(java.util.List<T> data)Sets the list of data items.TokenPaginatedResult<T>setLastKey(java.lang.String lastKey)Sets the token for retrieving the next page of results.
-
-
-
Method Detail
-
getData
public java.util.List<T> getData()
Gets the list of data items.- Returns:
- the data
-
setData
public TokenPaginatedResult<T> setData(java.util.List<T> data)
Sets the list of data items.- Parameters:
data- the data- Returns:
- this TokenPaginatedResult instance for method chaining
-
getLastKey
public java.lang.String getLastKey()
Gets the token for retrieving the next page of results.- Returns:
- the last key
-
setLastKey
public TokenPaginatedResult<T> setLastKey(java.lang.String lastKey)
Sets the token for retrieving the next page of results.- Parameters:
lastKey- the last key- Returns:
- this TokenPaginatedResult instance for method chaining
-
hasMorePages
public boolean hasMorePages()
Checks if there are more pages available.- Returns:
- true if there are more pages (lastKey is not null and not empty), false otherwise
-
-