820
821 @java.io.Serial
822 private static final long serialVersionUID = -8492269157353014774L;
823
824 private Permissions perms;
825
826 /**
827 * Create a read-only empty PermissionCollection object.
828 */
829 public UnsupportedEmptyCollection() {
830 this.perms = new Permissions();
831 perms.setReadOnly();
832 }
833
834 /**
835 * Adds a permission object to the current collection of permission
836 * objects.
837 *
838 * @param permission the Permission object to add.
839 *
840 * @exception SecurityException - if this PermissionCollection object
841 * has been marked readonly
842 */
843 @Override public void add(Permission permission) {
844 perms.add(permission);
845 }
846
847 /**
848 * Checks to see if the specified permission is implied by the
849 * collection of Permission objects held in this PermissionCollection.
850 *
851 * @param permission the Permission object to compare.
852 *
853 * @return true if "permission" is implied by the permissions in
854 * the collection, false if not.
855 */
856 @Override public boolean implies(Permission permission) {
857 return perms.implies(permission);
858 }
859
860 /**
|
820
821 @java.io.Serial
822 private static final long serialVersionUID = -8492269157353014774L;
823
824 private Permissions perms;
825
826 /**
827 * Create a read-only empty PermissionCollection object.
828 */
829 public UnsupportedEmptyCollection() {
830 this.perms = new Permissions();
831 perms.setReadOnly();
832 }
833
834 /**
835 * Adds a permission object to the current collection of permission
836 * objects.
837 *
838 * @param permission the Permission object to add.
839 *
840 * @throws SecurityException - if this PermissionCollection object
841 * has been marked readonly
842 */
843 @Override public void add(Permission permission) {
844 perms.add(permission);
845 }
846
847 /**
848 * Checks to see if the specified permission is implied by the
849 * collection of Permission objects held in this PermissionCollection.
850 *
851 * @param permission the Permission object to compare.
852 *
853 * @return true if "permission" is implied by the permissions in
854 * the collection, false if not.
855 */
856 @Override public boolean implies(Permission permission) {
857 return perms.implies(permission);
858 }
859
860 /**
|