Package no.priv.bang.ukelonn.api.beans
Record Class LoginResult
java.lang.Object
java.lang.Record
no.priv.bang.ukelonn.api.beans.LoginResult
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLoginResult(String username, List<String> roles, String errorMessage) Creates an instance of aLoginResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.final inthashCode()Returns a hash code value for this object.roles()Returns the value of therolesrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.static LoginResult.Builderwith()
-
Field Details
-
username
The field for theusernamerecord component. -
roles
The field for therolesrecord component. -
errorMessage
The field for theerrorMessagerecord component.
-
-
Constructor Details
-
LoginResult
Creates an instance of aLoginResultrecord class.- Parameters:
username- the value for theusernamerecord componentroles- the value for therolesrecord componenterrorMessage- the value for theerrorMessagerecord component
-
-
Method Details
-
with
-
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. -
hashCode
public final 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). -
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
roles
Returns the value of therolesrecord component.- Returns:
- the value of the
rolesrecord component
-
errorMessage
Returns the value of theerrorMessagerecord component.- Returns:
- the value of the
errorMessagerecord component
-