Enum PermissionCheckResult
- java.lang.Object
-
- java.lang.Enum<PermissionCheckResult>
-
- de.dytanic.cloudnet.driver.permission.PermissionCheckResult
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<PermissionCheckResult>
public enum PermissionCheckResult extends java.lang.Enum<PermissionCheckResult>
A response, if a permissible has to check his permission that contains and allow and element
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOWEDThe permissible has the following permission or the privileges to has the permissionDENIEDThe following permission is not defined or the potency from permissible or from the defined permission is not high enoughFORBIDDENThe following permission is set on permissible, but the potency is set to -1 and doesn't allow to has the permission
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanasBoolean()Returns the result as booleanstatic PermissionCheckResultfromBoolean(java.lang.Boolean result)static PermissionCheckResultfromPermission(Permission permission)static PermissionCheckResultvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static PermissionCheckResult[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALLOWED
public static final PermissionCheckResult ALLOWED
The permissible has the following permission or the privileges to has the permission
-
DENIED
public static final PermissionCheckResult DENIED
The following permission is not defined or the potency from permissible or from the defined permission is not high enough
-
FORBIDDEN
public static final PermissionCheckResult FORBIDDEN
The following permission is set on permissible, but the potency is set to -1 and doesn't allow to has the permission
-
-
Method Detail
-
values
public static PermissionCheckResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PermissionCheckResult c : PermissionCheckResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PermissionCheckResult valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
fromBoolean
public static PermissionCheckResult fromBoolean(java.lang.Boolean result)
-
fromPermission
public static PermissionCheckResult fromPermission(Permission permission)
-
asBoolean
public boolean asBoolean()
Returns the result as boolean- Returns:
- the result as boolean
-
-