NIMSDK-AOS  9.16.3
QChatSearchMsgByPageResult.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.result;
2 
4 import java.io.Serializable;
5 import java.util.List;
6 
10 public class QChatSearchMsgByPageResult extends QChatGetByPageWithCursorResult implements Serializable{
11 
15  private final List<QChatMessage> messages;
16 
17  public QChatSearchMsgByPageResult(String cursor, List<QChatMessage> messages) {
18  super(cursor);
19  this.messages = messages;
20  }
21 
22  public QChatSearchMsgByPageResult(boolean hasMore, long nextTimeTag, String cursor,List<QChatMessage> messages) {
23  super(hasMore, nextTimeTag, cursor);
24  this.messages = messages;
25  }
26 
32  @Override
33  public boolean isHasMore() {
34  return super.isHasMore();
35  }
36 
42  @Override
43  public long getNextTimeTag() {
44  return super.getNextTimeTag();
45  }
46 
52  @Override
53  public String getCursor() {
54  return super.getCursor();
55  }
56 
61  public List<QChatMessage> getMessages() {
62  return messages;
63  }
64 
65  @Override
66  public String toString() {
67  return "QChatSearchMsgByPageResult{" +
68  "hasMore=" + hasMore +
69  ", nextTimeTag=" + nextTimeTag +
70  ", cursor='" + cursor + '\'' +
71  ", messages=" + messages +
72  '}';
73  }
74 }
String getCursor()
获取查询游标,下次查询的起始位置
final boolean hasMore
表示是否还有下一页
QChatSearchMsgByPageResult(String cursor, List< QChatMessage > messages)
String cursor
可选:查询游标,下次查询的起始位置
QChatSearchMsgByPageResult(boolean hasMore, long nextTimeTag, String cursor, List< QChatMessage > messages)
final long nextTimeTag
下一次翻页时的起始时间戳
long getNextTimeTag()
获取下一次翻页时的起始时间戳
List< QChatMessage > getMessages()
获取查询到的消息列表