JBoss API: Class SimplePrincipal

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

## org.jboss.security
Class SimplePrincipal

    java.lang.Object
      |
      +--org.jboss.security.SimplePrincipal

All Implemented Interfaces:
  java.security.Principal, java.io.Serializable

public class SimplePrincipal
extends java.lang.Object
implements java.security.Principal, java.io.Serializable

A simple String based implementation of Principal. Typically a SimplePrincipal is created given a userID which is used as the Principal name.

Author:
  Oleg Nitz, Scott.Stark@jboss.org
See Also:
  Serialized Form

Constructor Summary
`SimplePrincipal(java.lang.String name)`

Method Summary
`boolean` | `equals(java.lang.Object another)` Compare this SimplePrincipal's name against another Principal
`java.lang.String` | `getName()`
`int` | `hashCode()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimplePrincipal

    public SimplePrincipal(java.lang.String name)

Method Detail

### equals

    public boolean equals(java.lang.Object another)

  Compare this SimplePrincipal's name against another Principal
  Specified by:
    `equals` in interface `java.security.Principal`
  Overrides:
    `equals` in class `java.lang.Object`
  Returns:
    true if name equals another.getName();

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `java.security.Principal`
  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Specified by:
    `toString` in interface `java.security.Principal`
  Overrides:
    `toString` in class `java.lang.Object`

### getName

    public java.lang.String getName()

  Specified by:
    `getName` in interface `java.security.Principal`

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

Copyright © 2000 The JBoss Organization. All Rights Reserved.