|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.util.security.GroupSet
This class represents a set of Groups. It's useful for building administration UI. It wraps a TreeSet object to enforce that only Group objects are allowed in the set and only relevant methods are available. TreeSet's contain only unique Objects (no duplicates).
Field Summary | |
private java.util.TreeSet |
set
Set to hold the Group Set |
Constructor Summary | |
GroupSet()
Constructs an empty GroupSet |
|
GroupSet(java.util.Collection groups)
Constructs a new GroupSet with specifed contents. |
Method Summary | |
boolean |
add(java.util.Collection groups)
Adds the Groups in a Collection to this GroupSet. |
boolean |
add(Group group)
Adds a Group to this GroupSet. |
boolean |
add(GroupSet groupSet)
Adds the Groups in another GroupSet to this GroupSet. |
void |
clear()
Removes all Groups from this GroupSet. |
boolean |
contains(Group group)
Checks whether this GroupSet contains a Group. |
boolean |
contains(java.lang.String groupName)
Compares by name a Group with the Groups contained in this GroupSet. |
java.util.Iterator |
elements()
Returns an Iterator for Groups in this GroupSet. |
Group |
getGroup(java.lang.String groupName)
Returns a Group with the given name, if it is contained in this GroupSet. |
Group[] |
getGroupsArray()
Returns an Groups[] of Groups in this GroupSet. |
boolean |
remove(Group group)
Removes a Group from this GroupSet. |
int |
size()
Returns size (cardinality) of this set. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.TreeSet set
Constructor Detail |
public GroupSet()
public GroupSet(java.util.Collection groups)
groups
- A collection of groups to be contained in the set.Method Detail |
public boolean add(Group group)
group
- A Group.public boolean add(java.util.Collection groups)
groupSet
- A Collection of Groups.public boolean add(GroupSet groupSet)
groupSet
- A GroupSet.public boolean remove(Group group)
group
- A Group.public void clear()
public boolean contains(Group group)
group
- A Group.public boolean contains(java.lang.String groupName)
groupName
- Name of Group.public Group getGroup(java.lang.String groupName)
groupName
- Name of Group.public Group[] getGroupsArray()
public java.util.Iterator elements()
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |