|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.util.security.SecuritySet<T>
public abstract class SecuritySet<T>
This class represents a set of Security Entities. It makes it easy to build a UI. It wraps a TreeSet object to enforce that only relevant methods are available. TreeSet's contain only unique Objects (no duplicates).
Field Summary | |
---|---|
protected Map<Integer,T> |
idMap
Map for "id" -> "security object" |
protected Map<String,T> |
nameMap
Map for "name" -> "security object" |
Constructor Summary | |
---|---|
SecuritySet()
Constructs an empty Set |
Method Summary | |
---|---|
void |
clear()
Removes all Objects from this Set. |
boolean |
containsId(int id)
Searches if an Object with a given Id is in the Set |
boolean |
containsName(String name)
Searches if an Object with a given name is in the Set |
Set<Integer> |
getIds()
Returns a set of Id values in this Object. |
Set<String> |
getNames()
Returns a set of Names in this Object. |
Set<? extends T> |
getSet()
Returns a set of security objects in this object. |
Iterator<T> |
iterator()
Returns an Iterator for Objects in this Set. |
int |
size()
Returns size (cardinality) of this set. |
String |
toString()
list of role names in this set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Map<String,T> nameMap
protected Map<Integer,T> idMap
Constructor Detail |
---|
public SecuritySet()
Method Detail |
---|
public Set<? extends T> getSet()
public Set<String> getNames()
public Set<Integer> getIds()
public void clear()
public boolean containsName(String name)
roleName
- Name of the Security Object.
public boolean containsId(int id)
id
- Id of the Security Object.
public Iterator<T> iterator()
iterator
in interface Iterable<T>
public int size()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |