home *** CD-ROM | disk | FTP | other *** search
Java Source | 1999-05-28 | 1.6 KB | 62 lines | [TEXT/CWIE] |
- /*
- * @(#)Principal.java 1.16 98/06/29
- *
- * Copyright 1996-1998 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
- package java.security;
-
- /**
- * This interface represents the abstract notion of a principal, which
- * can be used to represent any entity, such as an individual, a
- * corporation, and a login id.
- *
- * @see java.security.cert.X509Certificate
- *
- * @version 1.16, 99/03/26
- * @author Li Gong */
- public interface Principal {
-
- /**
- * Compares this principal to the specified object. Returns true
- * if the object passed in matches the principal represented by
- * the implementation of this interface.
- *
- * @param another principal to compare with.
- *
- * @return true if the principal passed in is the same as that
- * encapsulated by this principal, and false otherwise.
-
- */
- public boolean equals(Object another);
-
- /**
- * Returns a string representation of this principal.
- *
- * @return a string representation of this principal.
- */
- public String toString();
-
- /**
- * Returns a hashcode for this principal.
- *
- * @return a hashcode for this principal.
- */
- public int hashCode();
-
- /**
- * Returns the name of this principal.
- *
- * @return the name of this principal.
- */
- public String getName();
- }
-