adding more accessor methods.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6399 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-12-23 22:38:39 +00:00
1 parent 0b4cefeceb
commit 16fb103a93
1 file changed
+13
@@ -127,6 +127,15 @@ public final class Permission {
return ALL_GROUPS;
}
/**
* Gets the {@link Group} whose {@link Group#owner} is the given class.
*
* @return null if not found.
*/
public static Group getGroup(Class owner) {
return PERMISSIONS.get(owner);
}
/**
* All the permissions in the system, keyed by their owners.
*/
@@ -195,6 +204,10 @@ public final class Permission {
public int compareTo(Group that) {
return this.owner.getName().compareTo(that.owner.getName());
}
public int size() {
return permisisons.size();
}
}
//