public final class PrincipalWrapper
extends java.lang.Object
implements java.security.Principal
| Constructor and Description |
|---|
PrincipalWrapper(java.security.Principal principal)
Constructs a new instance of this class by wrapping (decorating)
the supplied principal.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Two PrincipalWrapper objects are equal if their internally-wrapped
principals are also equal.
|
java.lang.String |
getName()
Returns the name of the wrapped principal.
|
java.security.Principal |
getPrincipal()
Returns the wrapped Principal used to construct this instance.
|
int |
hashCode()
The hashcode is based on the hashcode of the wrapped principal.
|
public PrincipalWrapper(java.security.Principal principal)
principal - The principal to wrappublic final java.security.Principal getPrincipal()
public final java.lang.String getName()
getName in interface java.security.Principal@CheckReturnValue public boolean equals(java.lang.Object obj)
equals in interface java.security.Principalequals in class java.lang.Objectobj - @CheckReturnValue public int hashCode()
hashCode in interface java.security.PrincipalhashCode in class java.lang.ObjectstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.