Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.keycloak.adapters.tomcat7;
 
 import java.util.Set;
 
public class SimpleGroup extends SimplePrincipal implements Group {
    private static final long serialVersionUID = 3273437693505893786L;
    private final Set<Principalmembers = new HashSet<Principal>();

    
Creates a new group with the given name.

Parameters:
name Group name.
    public SimpleGroup(final String name) {
        super(name);
    }
    public boolean addMember(final Principal user) {
        return this..add(user);
    }
    public boolean isMember(final Principal member) {
        return this..contains(member);
    }
    public Enumeration<? extends Principalmembers() {
        return Collections.enumeration(this.);
    }
    public boolean removeMember(final Principal user) {
        return this..remove(user);
    }
    
    public String toString() {
        return super.toString() + ": " + .toString();
    }
New to GrepCode? Check out our FAQ X