Class AbstractPermissionCollection

    • Constructor Detail

      • AbstractPermissionCollection

        protected AbstractPermissionCollection​(AbstractPermission<?> sourcePermission)
        Construct a new instance.
        Parameters:
        sourcePermission - the source permission for this collection (must not be null)
    • Method Detail

      • size

        public abstract int size()
        Get the size of this permission collection.
        Returns:
        the size of this permission collection
      • add

        public final void add​(Permission permission)
        Add an item to this collection. The permission class must be the same as the source permission's class.
        Specified by:
        add in class PermissionCollection
        Parameters:
        permission - the permission to add (must not be null)
      • doAdd

        protected abstract void doAdd​(AbstractPermission<?> permission)
        Perform the work of adding a permission. The permission is guaranteed to be of the correct type and the collection is guaranteed to have been writable at the time the add(Permission) method was called.
        Parameters:
        permission - the non-null permission