public class CassandraPrincipal
extends java.lang.Object
implements java.security.Principal, java.io.Serializable
 This class implements the Principal interface
 and represents a user.
 
 Principals such as this CassPrincipal
 may be associated with a particular Subject
 to augment that Subject with an additional
 identity.  Refer to the Subject class for more information
 on how to achieve this.  Authorization decisions can then be based upon
 the Principals associated with a Subject.
Principal, 
Subject, 
Serialized Form| Constructor and Description | 
|---|
| CassandraPrincipal(java.lang.String name)Create a CassPrincipal with a username. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(java.lang.Object o)Compares the specified Object with this  CassPrincipalfor equality. | 
| java.lang.String | getName()Return the username for this  CassPrincipal. | 
| int | hashCode()Return a hash code for this  CassPrincipal. | 
| java.lang.String | toString()Return a string representation of this  CassPrincipal. | 
public CassandraPrincipal(java.lang.String name)
name - the username for this user.java.lang.NullPointerException - if the name
                  is null.public java.lang.String getName()
CassPrincipal.
 getName in interface java.security.PrincipalCassPrincipalpublic java.lang.String toString()
CassPrincipal.
 toString in interface java.security.PrincipaltoString in class java.lang.ObjectCassPrincipal.public boolean equals(java.lang.Object o)
CassPrincipal
 for equality.  Returns true if the given object is also a
 CassPrincipal and the two CassPrincipals
 have the same username.
 equals in interface java.security.Principalequals in class java.lang.Objecto - Object to be compared for equality with this
          CassPrincipal.CassPrincipal.public int hashCode()
CassPrincipal.
 hashCode in interface java.security.PrincipalhashCode in class java.lang.ObjectCassPrincipal.Copyright © 2018 The Apache Software Foundation