com.sinch.sdk.domains.sms.models.SMSCursorPageNavigator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
package com.sinch.sdk.domains.sms.models;
import com.sinch.sdk.core.models.pagination.PageNavigator;
public class SMSCursorPageNavigator extends PageNavigator {
private final Integer currentPage;
private final Integer pageSize;
public SMSCursorPageNavigator(Integer currentPage, Integer pageSize) {
super(null);
this.currentPage = currentPage;
this.pageSize = pageSize;
}
private Integer computeNextPageCursor() {
return null == pageSize || pageSize == 0 ? null : currentPage + 1;
}
@Override
public Integer getToken() {
return computeNextPageCursor();
}
@Override
public String toString() {
return "SMSCursorPageNavigator{"
+ "currentPage="
+ currentPage
+ ", pageSize="
+ pageSize
+ "} "
+ super.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy