|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.safehaus.triplesec.guardian.Permissions
public class Permissions
Represnets an immutable set of Permissions.
| Constructor Summary | |
|---|---|
Permissions(java.lang.String applicationName,
Permission[] permissions)
Creates a new instance. |
|
| Method Summary | |
|---|---|
Permissions |
addAll(Permissions permissions)
Creates a new set of Permissions which contains all elements of
both this set and the specified set (OR operation). |
java.lang.Object |
clone()
|
boolean |
contains(Permission permission)
Returns true if and only if this set contains the specified permission. |
boolean |
contains(java.lang.String permissionName)
Returns true if and only if this set contains the Permission
with the specified permissionName. |
boolean |
containsAll(Permissions permissions)
Returns true if and only if this set contains all elements of the specified permissions. |
boolean |
equals(java.lang.Object that)
|
Permission |
get(java.lang.String permissionName)
Returns the Permission with the specified permissionName. |
java.lang.String |
getApplicationName()
Returns the name of the application this permissions belong to |
int |
hashCode()
|
boolean |
isEmpty()
Returns true if this set is empty. |
java.util.Iterator |
iterator()
Returns an Iterator that iterates all Permissions this set contains. |
Permissions |
removeAll(Permissions permissions)
Creates a new set of Permissions which contains elements of
this set excluding what exists in the specified set (NAND operation). |
Permissions |
retainAll(Permissions permissions)
Creates a new set of Permissions which contains elements which
exists in both this set and the specified set (AND operation). |
int |
size()
Returns the number of elements this set contains. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Permissions(java.lang.String applicationName,
Permission[] permissions)
applicationName - The name of the application this permissions belong topermissions - The array of Permissions that will belong to this permission set| Method Detail |
|---|
public java.lang.String getApplicationName()
public boolean contains(Permission permission)
permission - the permission to find
public boolean contains(java.lang.String permissionName)
Permission
with the specified permissionName.
permissionName - the name of the permission to find
public boolean containsAll(Permissions permissions)
permissions - another set of permissions
public Permission get(java.lang.String permissionName)
Permission with the specified permissionName.
permissionName - the name of the permission to find
public boolean isEmpty()
public int size()
public java.util.Iterator iterator()
Iterator that iterates all Permissions this set contains.
Iterator that iterates all Permissions this set containspublic Permissions addAll(Permissions permissions)
Permissions which contains all elements of
both this set and the specified set (OR operation). This operation never
modifies this set.
permissions - a set of permissions to add
public Permissions removeAll(Permissions permissions)
Permissions which contains elements of
this set excluding what exists in the specified set (NAND operation).
This operation never modifies this set.
permissions - a set of permissions to remove
public Permissions retainAll(Permissions permissions)
Permissions which contains elements which
exists in both this set and the specified set (AND operation). This
operation never modifies this set.
permissions - a set of permissions to retain.
public java.lang.Object clone()
clone in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object that)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||