示例#1
0
  /* (non-Javadoc)
   * @see net.sf.gilead.test.domain.stateless.IGroup#addMember(net.sf.gilead.test.domain.IUser)
   */
  public void addMember(IUser user) {
    if (members == null) {
      members = new HashSet<IUser>();
    }

    if (members.contains(user) == false) {
      members.add(user);
      user.addToGroup(this);
    }
  }
示例#2
0
 /* (non-Javadoc)
  * @see net.sf.gilead.test.domain.stateless.IGroup#removeMember(net.sf.gilead.test.domain.IUser)
  */
 public void removeMember(IUser user) {
   if ((members != null) && (members.contains(user))) {
     members.remove(user);
     user.removeUserFromGroup(this);
   }
 }