Class AbstractPermission<This extends AbstractPermission<This>>

    • Constructor Detail

      • AbstractPermission

        protected AbstractPermission​(String name)
        Construct a new instance.
        Parameters:
        name - the permission name
    • Method Detail

      • implies

        public final boolean implies​(Permission permission)
        Determine whether this permission implies another permission.
        Specified by:
        implies in interface PermissionVerifier
        Specified by:
        implies in class Permission
        Parameters:
        permission - the other permission
        Returns:
        true if this permission implies the other; false otherwise
      • implies

        public abstract boolean implies​(This permission)
        Determine whether this permission implies another permission.
        Parameters:
        permission - the other permission
        Returns:
        true if this permission implies the other; false otherwise
      • equals

        public final boolean equals​(Object obj)
        Determine whether this permission object is equal to another object.
        Specified by:
        equals in class Permission
        Parameters:
        obj - the object to compare to
        Returns:
        true if the object is a permission equal to this one; false otherwise
      • equals

        public abstract boolean equals​(This other)
        Determine whether this permission object is equal to another object of this permission type.
        Parameters:
        other - the permission to compare to
        Returns:
        true if the object is a permission equal to this one; false otherwise
      • hashCode

        public abstract int hashCode()
        Get the hash code of this permission. The result must be consistent with the defined equals(AbstractPermission) result.
        Specified by:
        hashCode in class Permission
        Returns:
        the hash code of this permission
      • getActions

        public String getActions()
        Get the actions string. The default implementation always returns an empty string.
        Specified by:
        getActions in class Permission
        Returns:
        the actions string (not null)
      • requireEmptyActions

        protected static void requireEmptyActions​(String actions)
                                           throws IllegalArgumentException
        Check to ensure that the given action string is empty or null; otherwise, throw an exception.
        Parameters:
        actions - the actions string
        Throws:
        IllegalArgumentException - if the actions string is not empty
      • writeReplace

        final Object writeReplace()