NIMSDK-AOS  10.5.0
QChatChannelIdInfo.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.model;
2 
3 import androidx.annotation.NonNull;
4 import java.io.Serializable;
5 import java.util.Objects;
6 
10 public class QChatChannelIdInfo implements Serializable {
14  @NonNull
15  private final Long serverId;
19  @NonNull
20  private final Long channelId;
21 
22  public QChatChannelIdInfo(long serverId, long channelId) {
23  this.serverId = serverId;
24  this.channelId = channelId;
25  }
26 
27  @NonNull
28  public Long getServerId() {
29  return serverId;
30  }
31 
32  @NonNull
33  public Long getChannelId() {
34  return channelId;
35  }
36 
37  @Override
38  public boolean equals(Object o) {
39  if (this == o) {
40  return true;
41  }
42  if (o == null || getClass() != o.getClass()) {
43  return false;
44  }
46  return Objects.equals(serverId, that.serverId) && Objects.equals(channelId, that.channelId);
47  }
48 
49  @Override
50  public int hashCode() {
51  return Objects.hash(serverId, channelId);
52  }
53 
54  @Override
55  public String toString() {
56  return "QChatChannelIdInfo{" +
57  "serverId=" + serverId +
58  ", channelId=" + channelId +
59  '}';
60  }
61 }