- java.lang.Object
- 
- com.sun.security.auth.NTUserPrincipal
 
- 
- All Implemented Interfaces:
- Serializable,- Principal
 
 public class NTUserPrincipal extends Object implements Principal, Serializable This class implements thePrincipalinterface and represents a Windows NT user.Principals such as this NTUserPrincipalmay be associated with a particularSubjectto augment thatSubjectwith an additional identity. Refer to theSubjectclass for more information on how to achieve this. Authorization decisions can then be based upon the Principals associated with aSubject.- See Also:
- Principal,- Subject, Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description NTUserPrincipal(String name)Create anNTUserPrincipalwith a Windows NT username.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compares the specified Object with thisNTUserPrincipalfor equality.StringgetName()Return the Windows NT username for thisNTPrincipal.inthashCode()Return a hash code for thisNTUserPrincipal.StringtoString()Return a string representation of thisNTPrincipal.
 
- 
- 
- 
Constructor Detail- 
NTUserPrincipalpublic NTUserPrincipal(String name) Create anNTUserPrincipalwith a Windows NT username.- Parameters:
- name- the Windows NT username for this user.
- Throws:
- NullPointerException- if the- nameis- null.
 
 
- 
 - 
Method Detail- 
getNamepublic String getName() Return the Windows NT username for thisNTPrincipal.
 - 
toStringpublic String toString() Return a string representation of thisNTPrincipal.
 - 
equalspublic boolean equals(Object o) Compares the specified Object with thisNTUserPrincipalfor equality. Returns true if the given object is also aNTUserPrincipaland the two NTUserPrincipals have the same name.
 - 
hashCodepublic int hashCode() Return a hash code for thisNTUserPrincipal.- Specified by:
- hashCodein interface- Principal
- Overrides:
- hashCodein class- Object
- Returns:
- a hash code for this NTUserPrincipal.
- See Also:
- Object.equals(java.lang.Object),- System.identityHashCode(java.lang.Object)
 
 
- 
 
-