Class SamplePrincipal
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.login.SamplePrincipal
-
- All Implemented Interfaces:
java.io.Serializable
,java.security.Principal
public class SamplePrincipal extends java.lang.Object implements java.security.Principal, java.io.Serializable
This class implements thePrincipal
interface to represents a Sample Principal.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SamplePrincipal(java.lang.String name)
Create a SamplePrincipal with a name.
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object object)
Compares the specified Object with thisSamplePrincipal
for equality.java.lang.String
getName()
Return the name for thisSamplePrincipal
.int
hashCode()
Return a hash code for thisSamplePrincipal
.java.lang.String
toString()
Return a string representation of thisSamplePrincipal
.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Return the name for thisSamplePrincipal
.- Specified by:
getName
in interfacejava.security.Principal
- Returns:
- the name.
-
toString
public java.lang.String toString()
Return a string representation of thisSamplePrincipal
.- Specified by:
toString
in interfacejava.security.Principal
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation.
-
equals
public boolean equals(java.lang.Object object)
Compares the specified Object with thisSamplePrincipal
for equality.- Specified by:
equals
in interfacejava.security.Principal
- Overrides:
equals
in classjava.lang.Object
- Parameters:
object
- Object to be compared.- Returns:
- true if the specified Object is equal equal to this
SamplePrincipal
.
-
hashCode
public int hashCode()
Return a hash code for thisSamplePrincipal
.- Specified by:
hashCode
in interfacejava.security.Principal
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code.
-
-