X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=security%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fusermgt%2FInMemoryGroupSet.java;h=b9d133abcd397287b3ebf400d6ce48e252eb2625;hb=81fe8784a2182e25f92a7591ec5b0fba00afb828;hp=04f8be223c7569c0c6a1c00641478271cb9d2b2e;hpb=955ee3a4f180b31a9c0161d91ff6e517aac44c6f;p=utils diff --git a/security/src/main/java/org/wamblee/usermgt/InMemoryGroupSet.java b/security/src/main/java/org/wamblee/usermgt/InMemoryGroupSet.java index 04f8be22..b9d133ab 100644 --- a/security/src/main/java/org/wamblee/usermgt/InMemoryGroupSet.java +++ b/security/src/main/java/org/wamblee/usermgt/InMemoryGroupSet.java @@ -21,34 +21,36 @@ import java.util.TreeSet; /** * In-memory group set implementation. + * + * @author Erik Brakkee */ public class InMemoryGroupSet implements GroupSet { /** * Groups. */ - private Set _groups; + private Set groups; /** * Constructs an empty group set. */ public InMemoryGroupSet() { - _groups = new TreeSet(); + groups = new TreeSet(); } /* (non-Javadoc) * @see org.wamblee.usermgt.GroupSet#groupModified(org.wamblee.usermgt.Group) */ public void groupModified(Group aGroup) { - _groups.remove(aGroup); - _groups.add(aGroup); + groups.remove(aGroup); + groups.add(aGroup); } /* (non-Javadoc) * @see org.wamblee.usermgt.GroupSet#find(java.lang.String) */ public Group find(String aName) { - for (Group group: _groups) { + for (Group group: groups) { if ( group.getName().equals(aName)) { return new Group(group); } @@ -60,21 +62,21 @@ public class InMemoryGroupSet implements GroupSet { * @see org.wamblee.usermgt.GroupSet#contains(org.wamblee.usermgt.Group) */ public boolean contains(Group aGroup) { - return _groups.contains(aGroup); + return groups.contains(aGroup); } /* (non-Javadoc) * @see org.wamblee.usermgt.GroupSet#add(org.wamblee.usermgt.Group) */ public boolean add(Group aGroup) { - return _groups.add(aGroup); + return groups.add(aGroup); } /* (non-Javadoc) * @see org.wamblee.usermgt.GroupSet#remove(org.wamblee.usermgt.Group) */ public boolean remove(Group aGroup) { - return _groups.remove(aGroup); + return groups.remove(aGroup); } /* (non-Javadoc) @@ -82,7 +84,7 @@ public class InMemoryGroupSet implements GroupSet { */ public Set list() { Set list = new TreeSet(); - for (Group group: _groups) { + for (Group group: groups) { list.add(new Group(group)); } return list; @@ -92,7 +94,7 @@ public class InMemoryGroupSet implements GroupSet { * @see org.wamblee.usermgt.GroupSet#size() */ public int size() { - return _groups.size(); + return groups.size(); } }