All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.agora.rtm.WhoNowResult Maven / Gradle / Ivy

package io.agora.rtm;

import io.agora.rtm.StateItem;
import java.util.ArrayList;

public class WhoNowResult {
  /**
   * The next page.
   */
  private String nextPage = "";

  /**
   * The list of userState.
   */
  private ArrayList userStateList;

  /**
   * The number of online users in current channel.
   *
   * @apiNote If call method {@code whoNow} with options
   *          {@code includeState = true}, totalOccupancy will equals size of
   *          userStateList. If call method {@code whoNow} with options
   *          {@code includeState = false}, totalOccupancy will not equals size of
   *          userStateList(userStateList is empty)
   */
  private int totalOccupancy;

  /**
   * Constructor for {@code WhoNowResult} with default parameters.
   */
  public WhoNowResult() {
    this.totalOccupancy = 0;
    this.userStateList = new ArrayList();
  }

  public WhoNowResult(String nextPage, ArrayList userStateList, int totalOccupancy) {
    this.nextPage = nextPage;
    this.totalOccupancy = totalOccupancy;
    this.userStateList = userStateList;
  }

  public String getNextPage() {
    return this.nextPage;
  }

  public ArrayList getUserStateList() {
    return this.userStateList;
  }

  public int getTotalOccupancy() {
    return this.totalOccupancy;
  }

  @Override
  public String toString() {
    return "WhoNowResult { totalOccupancy: " + totalOccupancy + ", nextPage: " + nextPage
        + ", userStateList" + userStateList + "}";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy