Record Class SimpleUserPrincipal
java.lang.Object
java.lang.Record
org.infinispan.server.core.security.simple.SimpleUserPrincipal
- All Implemented Interfaces:
Principal
,UserPrincipal
SimpleUserPrincipal.
- Since:
- 7.0
- Author:
- Tristan Tarrant
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleUserPrincipal
(String name) Creates an instance of aSimpleUserPrincipal
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.boolean
equals
(SimpleUserPrincipal other) getName()
int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
SimpleUserPrincipal
Creates an instance of aSimpleUserPrincipal
record class.- Parameters:
name
- the value for thename
record component
-
-
Method Details
-
getName
-
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
equals
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-