Class StringPermission

    • Constructor Detail

      • StringPermission

        public StringPermission​(String permissionName,
                                String... actions)
        Constructs a permission with the specified name and actions.
        Parameters:
        permissionName - must not be null or empty and must not contain comma
        actions - optional actions; action itself must not be null or empty and must not contain comma
    • Method Detail

      • implies

        public boolean implies​(Permission p)
        Checks if this StringPermission object "implies" the specified permission.

        More precisely, this method returns true if:

        • p is an instance of the StringPermission
        • p's name equals this object's name
        • compared permissions have no actions, or this object's actions contains at least one of the p actions
        Specified by:
        implies in class Permission
        Parameters:
        p - the permission to check against
        Returns:
        true if the specified permission is implied by this object