public abstract class AbstractPermission extends java.lang.Object implements Permission
Permission
implementations.AbstractRegisteredPermission
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected char |
code |
protected int |
mask |
RESERVED_OFF, RESERVED_ON, THIRTY_TWO_RESERVED_OFF
Modifier | Constructor and Description |
---|---|
protected |
AbstractPermission(int mask,
char code) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object arg0) |
int |
getMask()
Returns the bits that represents the permission.
|
java.lang.String |
getPattern()
Returns a 32-character long bit pattern
String representing this permission. |
int |
hashCode() |
java.lang.String |
toString() |
public final boolean equals(java.lang.Object arg0)
equals
in class java.lang.Object
public final int getMask()
Permission
getMask
in interface Permission
public java.lang.String getPattern()
Permission
String
representing this permission.
Implementations are free to format the pattern as they see fit, although under no circumstances may
Permission.RESERVED_OFF
or Permission.RESERVED_ON
be used within the pattern. An exemption is in the case of
Permission.RESERVED_OFF
which is used to denote a bit that is off (clear).
Implementations may also elect to use Permission.RESERVED_ON
internally for computation purposes,
although this method may not return any String
containing Permission.RESERVED_ON
.
The returned String must be 32 characters in length.
This method is only used for user interface and logging purposes. It is not used in any permission calculations. Therefore, duplication of characters within the output is permitted.
getPattern
in interface Permission
public final java.lang.String toString()
toString
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object