Interface Permissions
-
public interface PermissionsA collection of all existingpermission typesand their states.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intgetAllowedBitmask()Gets the integer containing all allowed permission types.default Collection<PermissionType>getAllowedPermission()Gets a collection with permission types which are set to (PermissionState.ALLOWED).intgetDeniedBitmask()Gets the integer containing all denied permission types.default Collection<PermissionType>getDeniedPermissions()Gets a collection with permission types which are set to (PermissionState.DENIED).PermissionStategetState(PermissionType type)Gets the state of the given type.default Collection<PermissionType>getUnsetPermissions()Gets a collection with permission types which are set to (PermissionState.UNSET).booleanisEmpty()Checks if the all permission types are set toPermissionState.UNSET.default PermissionsBuildertoBuilder()Creates a new permissions builder from this permissions object.
-
-
-
Method Detail
-
getAllowedBitmask
int getAllowedBitmask()
Gets the integer containing all allowed permission types.- Returns:
- The integer containing all allowed permission types.
-
getDeniedBitmask
int getDeniedBitmask()
Gets the integer containing all denied permission types.- Returns:
- The integer containing all denied permission types.
-
getState
PermissionState getState(PermissionType type)
Gets the state of the given type.- Parameters:
type- The type.- Returns:
- The state of the type.
-
toBuilder
default PermissionsBuilder toBuilder()
Creates a new permissions builder from this permissions object.- Returns:
- The created builder.
- See Also:
PermissionsBuilder(Permissions)
-
getAllowedPermission
default Collection<PermissionType> getAllowedPermission()
Gets a collection with permission types which are set to (PermissionState.ALLOWED).- Returns:
- A collection with all allowed permissions.
-
getDeniedPermissions
default Collection<PermissionType> getDeniedPermissions()
Gets a collection with permission types which are set to (PermissionState.DENIED).- Returns:
- A collection with all denied permissions.
-
getUnsetPermissions
default Collection<PermissionType> getUnsetPermissions()
Gets a collection with permission types which are set to (PermissionState.UNSET).- Returns:
- A collection with all unset permissions.
-
isEmpty
boolean isEmpty()
Checks if the all permission types are set toPermissionState.UNSET.- Returns:
- Whether all permission types are set to UNSET or not.
-
-