Example #1
0
 /**
  * 获得此组用户
  *
  * @param userId 用户Id
  * @return 用组中有用户id为userId的用户,返回他,否则返回空
  */
 public UserPo getUser(String userId) {
   UserPo up = null;
   for (UserPo _up : userList) {
     if (_up.getUserId().equals(userId)) {
       up = _up;
       break;
     }
   }
   return up;
 }
Example #2
0
 public void addOneUser(UserPo up) {
   for (UserPo _up : userList) {
     if (up.getUserId().equals(_up.getUserId())) return;
   }
   userList.add(up);
 }