Class MessageList

java.lang.Object
com.sendly.models.MessageList
All Implemented Interfaces:
Iterable<Message>

public class MessageList extends Object implements Iterable<Message>
Represents a paginated list of messages.
  • Constructor Details

    • MessageList

      public MessageList(com.google.gson.JsonObject json)
      Create a MessageList from a JSON response.
  • Method Details

    • getData

      public List<Message> 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

      public Message first()
      Get first message.
    • last

      public Message last()
      Get last message.
    • get

      public Message get(int index)
      Get message at index.
    • iterator

      public Iterator<Message> iterator()
      Specified by:
      iterator in interface Iterable<Message>