NIMSDK-AOS  9.16.0
BlackListChangedNotify.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.friend.model;
2 
3 import java.io.Serializable;
4 import java.util.ArrayList;
5 import java.util.List;
6 
10 public class BlackListChangedNotify implements Serializable {
11 
12  private List<String> addedAccounts = new ArrayList<>();
13 
14  private List<String> removedAccounts = new ArrayList<>();
15 
16  public BlackListChangedNotify(List<String> addedAccounts, List<String> removedAccounts) {
17  if (addedAccounts != null && !addedAccounts.isEmpty()) {
18  this.addedAccounts.addAll(addedAccounts);
19  }
20 
21  if (removedAccounts != null && !removedAccounts.isEmpty()) {
22  this.removedAccounts.addAll(removedAccounts);
23  }
24  }
25 
26  public BlackListChangedNotify(String addedAccounts, String removedAccounts) {
27  if (addedAccounts != null) {
28  this.addedAccounts.add(addedAccounts);
29  }
30 
31  if (removedAccounts != null) {
32  this.removedAccounts.add(removedAccounts);
33  }
34  }
35 
41  public List<String> getAddedAccounts() {
42  return addedAccounts;
43  }
44 
50  public List<String> getRemovedAccounts() {
51  return removedAccounts;
52  }
53 }
BlackListChangedNotify(List< String > addedAccounts, List< String > removedAccounts)
BlackListChangedNotify(String addedAccounts, String removedAccounts)
List< String > getRemovedAccounts()
返回移出黑名单的用户账号
List< String > getAddedAccounts()
返回被加入到黑名单的用户账号