Class Overview
This class implements the principal interface.
Summary
Public Methods |
boolean
|
equals(Object another)
This function returns true if the object passed matches
the principal represented in this implementation
|
String
|
getName()
return the name of the principal.
|
int
|
hashCode()
return a hashcode for the principal.
|
String
|
toString()
Prints a stringified version of the principal.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
java.security.Principal
abstract
boolean
|
equals(Object another)
Compares this principal to the specified object.
|
abstract
String
|
getName()
Returns the name of this principal.
|
abstract
int
|
hashCode()
Returns a hashcode for this principal.
|
abstract
String
|
toString()
Returns a string representation of this principal.
|
|
Public Constructors
public
PrincipalImpl
(String user)
Construct a principal from a string user name.
Parameters
user
| The string form of the principal name.
|
Public Methods
public
boolean
equals
(Object another)
This function returns true if the object passed matches
the principal represented in this implementation
Parameters
another
| the Principal to compare with. |
Returns
- true if the Principal passed is the same as that
encapsulated in this object, false otherwise
public
String
getName
()
return the name of the principal.
Returns
- the name of this principal.
public
int
hashCode
()
return a hashcode for the principal.
Returns
- a hash code value for this object.
public
String
toString
()
Prints a stringified version of the principal.
Returns
- a string representation of the object.