Package com.sendly.models
Class MessageList
java.lang.Object
com.sendly.models.MessageList
Represents a paginated list of messages.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageList(com.google.gson.JsonObject json) Create a MessageList from a JSON response. -
Method Summary
Modifier and TypeMethodDescriptionfirst()Get first message.get(int index) Get message at index.getData()Get all messages.intgetLimit()Get limit.intGet offset.intgetTotal()Get total count.booleanhasMore()Check if there are more pages.booleanisEmpty()Check if empty.iterator()last()Get last message.intsize()Get the number of messages in this page.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MessageList
public MessageList(com.google.gson.JsonObject json) Create a MessageList from a JSON response.
-
-
Method Details
-
getData
Get all messages. -
getTotal
public int getTotal()Get total count. -
getLimit
public int getLimit()Get limit. -
getOffset
public int getOffset()Get offset. -
hasMore
public boolean hasMore()Check if there are more pages. -
size
public int size()Get the number of messages in this page. -
isEmpty
public boolean isEmpty()Check if empty. -
first
Get first message. -
last
Get last message. -
get
Get message at index. -
iterator
-