1. /*
  2. * @(#)Permission.java 1.9 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.security.acl;
  8. /**
  9. * This interface represents a permission, such as that used to grant
  10. * a particular type of access to a resource.
  11. *
  12. * @author Satish Dharmaraj
  13. */
  14. public interface Permission {
  15. /**
  16. * Returns true if the object passed matches the permission represented
  17. * in this interface.
  18. *
  19. * @param another the Permission object to compare with.
  20. *
  21. * @return true if the Permission objects are equal, false otherwise
  22. */
  23. public boolean equals(Object another);
  24. /**
  25. * Prints a string representation of this permission.
  26. *
  27. * @return the string representation of the permission.
  28. */
  29. public String toString();
  30. }