Hibok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 line
795 B

  1. class BlacklistMgr {
  2. //我拉黑的用户id
  3. static Set<int> myBlacklistSet = new Set();
  4. //拉黑我的用户Id
  5. static Set<int> blacklistMeSet = new Set();
  6. //--------------------我的黑名单相关操作
  7. static addMyBlackList(int userId) {
  8. myBlacklistSet.add(userId);
  9. }
  10. static removeMyBalckList(int userId) {
  11. myBlacklistSet.remove(userId);
  12. }
  13. static bool isInMyblaklist(int userId) {
  14. return myBlacklistSet.contains(userId);
  15. }
  16. //------------------被拉黑名单相关操作
  17. static addBlackListMe(int userId) {
  18. blacklistMeSet.add(userId);
  19. }
  20. static removeBalckListMe(int userId) {
  21. blacklistMeSet.remove(userId);
  22. }
  23. static bool isBlaklistMe(int userId) {
  24. return blacklistMeSet.contains(userId);
  25. }
  26. }