Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.java.security
Interface Principal

public interface Principal

Represents a principal, which can be an individual, a corporation, a program thread, or anything that can have an identity.

See Also:
  `Identity`

Method Summary
`boolean` | `equals(java.lang.Object another)` Compares two Objects for equality.
`java.lang.String` | `getName()` Returns the name of this principal.
`int` | `hashCode()` Returns a hash code value for this object (principal).
`java.lang.String` | `toString()` Generates a string representation of the object (principal).

Method Detail

### equals

    public boolean equals(java.lang.Object another)

  Compares two Objects for equality. The equals method compares this principal value with the value of the specified Object in the another parameter.

  The equals method implements the most discriminating possible equivalence relation on objects; that is, for any reference values X and Y, this method returns TRUE if and only if X and Y refer to the same object (X==Y has the value TRUE).

  Parameters:
    `another` - The reference object with which to compare.
  Returns:
    A boolean set to TRUE if and only if the argument (principal) passed-in is not NULL and contains the same value as that encapsulated by this principal, otherwise set to FALSE.
  Overrides:
    equals in class java.lang.Object

### toString

    public java.lang.String toString()

  Generates a string representation of the object (principal). It returns a string that textually represents the object. The result should be a concise but informative representation that is easy to read.
  Returns:
    The String representation of this object (principal).
  Overrides:
    toString in class java.lang.Object

### hashCode

    public int hashCode()

  Returns a hash code value for this object (principal). Whenever the hashCode() method is invoked on the same object more than once during an execution of a Java application, the hashCode() method must consistently return the same integer. This integer need not remain consistent from one execution of an application to another execution of the same application. If two objects are equal according to the equals() method, then calling the hashCode() method on each of the two objects must produce the same integer result.
  Returns:
    A hash code value for this object (principal).
  Overrides:
    hashCode in class java.lang.Object

### getName

    public java.lang.String getName()

  Returns the name of this principal.
  Returns:
    The name of this principal.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD