1 28 package net.sf.jguard.core.principals; 29 30 import java.util.ArrayList ; 31 import java.util.Collection ; 32 33 34 39 public class GroupPrincipal implements BasePrincipal { 40 private String name; 41 private Collection children; 42 private static final long serialVersionUID = -6416037506376087735L; 43 44 public GroupPrincipal(String name){ 45 this.name = name; 46 this.children = new ArrayList (); 47 } 48 49 public String getName() { 50 return this.name; 51 } 52 53 public int compareTo(Object group) { 54 GroupPrincipal groupPrincipal = (GroupPrincipal)group; 55 return this.name.compareTo(groupPrincipal.getName()); 56 } 57 58 62 public Collection getChildren(){ 63 return children; 64 } 65 66 } 67 | Popular Tags |