NIMSDK-AOS  10.9.50
V2NIMChatroomTagConfig.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.v2.chatroom.config;
2 
3 import java.io.Serializable;
4 import java.util.List;
5 
6 /**
7  * 聊天室标签配置
8  */
9 public class V2NIMChatroomTagConfig implements Serializable {
10  /**
11  * 登录标签
12  */
13  private final List<String> tags;
14 
15  /**
16  * 登录登出通知标签, 标签表达式
17  */
18  private final String notifyTargetTags;
19 
20  private V2NIMChatroomTagConfig() {
21  this(null, null);
22  }
23 
24  /**
25  *
26  * @param tags 登录标签
27  * @param notifyTargetTags 登录登出通知标签, 标签表达式
28  */
29  public V2NIMChatroomTagConfig(List<String> tags, String notifyTargetTags) {
30  this.tags = tags;
31  this.notifyTargetTags = notifyTargetTags;
32  }
33 
34  /**
35  * 获取登录标签
36  * @return 登录标签
37  */
38  public List<String> getTags() {
39  return tags;
40  }
41  /**
42  * 获取登录登出通知标签, 标签表达式
43  * @return 登录登出通知标签, 标签表达式
44  */
45  public String getNotifyTargetTags() {
46  return notifyTargetTags;
47  }
48 
49  @Override
50  public String toString() {
51  return "V2NIMChatroomTagConfig{" +
52  "tags=" + tags +
53  ", notifyTargetTags='" + notifyTargetTags + '\'' +
54  '}';
55  }
56 
57  /**
58  * V2NIMChatroomTagConfig参数构造器
59  */
60  public static final class V2NIMChatroomTagConfigBuilder {
61  private List<String> tags;
62  private String notifyTargetTags;
63 
64  private V2NIMChatroomTagConfigBuilder() {
65  }
66 
67  /**
68  * 获取V2NIMChatroomTagConfigBuilder实例
69  * @return V2NIMChatroomTagConfigBuilder实例
70  */
71  public static V2NIMChatroomTagConfigBuilder builder() {
72  return new V2NIMChatroomTagConfigBuilder();
73  }
74 
75  /**
76  * 设置登录标签
77  * @param tags 登录标签
78  * @return {@link V2NIMChatroomTagConfigBuilder}
79  */
80  public V2NIMChatroomTagConfigBuilder withTags(List<String> tags) {
81  this.tags = tags;
82  return this;
83  }
84  /**
85  * 设置登录登出通知标签, 标签表达式
86  * @param notifyTargetTags 登录登出通知标签, 标签表达式
87  * @return {@link V2NIMChatroomTagConfigBuilder}
88  */
89  public V2NIMChatroomTagConfigBuilder withNotifyTargetTags(String notifyTargetTags) {
90  this.notifyTargetTags = notifyTargetTags;
91  return this;
92  }
93  /**
94  * 构建V2NIMChatroomTagConfig
95  * @return {@link V2NIMChatroomTagConfig}
96  */
97  public V2NIMChatroomTagConfig build() {
98  return new V2NIMChatroomTagConfig(tags, notifyTargetTags);
99  }
100  }
101 }
V2NIMChatroomTagConfig(List< String > tags, String notifyTargetTags)
String getNotifyTargetTags()
获取登录登出通知标签, 标签表达式