public class CardPermission
extends java.security.Permission
A CardPermission with a name of *
applies to all
card terminals. The actions string is a comma separated list of the actions
listed below, or *
to signify "all actions."
Individual actions are:
Constructor and Description |
---|
CardPermission(java.lang.String terminalName,
java.lang.String actions)
Constructs a new CardPermission with the specified actions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this CardPermission for equality.
|
java.lang.String |
getActions()
Returns the canonical string representation of the actions.
|
int |
hashCode()
Returns the hash code value for this CardPermission object.
|
boolean |
implies(java.security.Permission permission)
Checks if this CardPermission object implies the specified permission.
|
public CardPermission(java.lang.String terminalName, java.lang.String actions)
terminalName
is the name of a CardTerminal or *
if this permission applies to all terminals. actions
contains a comma-separated list of the individual actions
or *
to signify all actions. For more information,
see the documentation at the top of this class.terminalName
- the name of the card terminal, or *
actions
- the action string (or null if the set of permitted
actions is empty)java.lang.NullPointerException
- if terminalName is nulljava.lang.IllegalArgumentException
- if actions is an invalid actions
specificationpublic java.lang.String getActions()
*
to signify all actions defined by this class or
the string concatenation of the comma-separated,
lexicographically sorted list of individual actions.getActions
in class java.security.Permission
public boolean implies(java.security.Permission permission)
permission
is an instance of CardPermission,
permission
's actions are a proper subset of this
object's actions, and
this object's getName()
method is either
*
or equal to permission
's name
.
implies
in class java.security.Permission
permission
- the permission to check againstpublic boolean equals(java.lang.Object obj)
object
, if
and only if
object
is an instance of CardPermission,
this.getName()
is equal to
((CardPermission)object).getName()
, and
this.getActions()
is equal to
((CardPermission)object).getActions()
.
equals
in class java.lang.Object
obj
- the object to be compared for equality with this CardPermissionObject.hashCode()
,
HashMap
public int hashCode()
hashCode
in class java.lang.Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)