瀏覽代碼

Merge pull request #85 from greboid/dev

Add a method to get all info in UserInfoEvent.
pull/86/head
Chris Smith 9 年之前
父節點
當前提交
e94cdf4a8c
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10
    0
      common/src/com/dmdirc/parser/events/UserInfoEvent.java

+ 10
- 0
common/src/com/dmdirc/parser/events/UserInfoEvent.java 查看文件

25
 import com.dmdirc.parser.interfaces.ClientInfo;
25
 import com.dmdirc.parser.interfaces.ClientInfo;
26
 import com.dmdirc.parser.interfaces.Parser;
26
 import com.dmdirc.parser.interfaces.Parser;
27
 
27
 
28
+import java.util.Collections;
28
 import java.util.Date;
29
 import java.util.Date;
29
 import java.util.EnumMap;
30
 import java.util.EnumMap;
30
 import java.util.Map;
31
 import java.util.Map;
64
         return Optional.ofNullable(info.get(type));
65
         return Optional.ofNullable(info.get(type));
65
     }
66
     }
66
 
67
 
68
+    /**
69
+     * Gets all the pieces of information about the user.
70
+     *
71
+     * @return Map of all information about a user, may be empty
72
+     */
73
+    public Map<UserInfoType, String> getInfo() {
74
+        return Collections.unmodifiableMap(info);
75
+    }
76
+
67
     /**
77
     /**
68
      * The types of user info that may be returned by the server.
78
      * The types of user info that may be returned by the server.
69
      */
79
      */

Loading…
取消
儲存