Record Class TokenDto
java.lang.Object
java.lang.Record
hu.rts.mike.example.dev.crm.model.TokenDto
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theprivilegesrecord component.private final StringThe field for therefreshrecord component.private final InstantThe field for therefreshExpirationrecord component.private final StringThe field for thetokenrecord component.private final InstantThe field for thetokenExpirationrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theprivilegesrecord component.refresh()Returns the value of therefreshrecord component.Returns the value of therefreshExpirationrecord component.token()Returns the value of thetokenrecord component.Returns the value of thetokenExpirationrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
token
The field for thetokenrecord component. -
tokenExpiration
The field for thetokenExpirationrecord component. -
privileges
The field for theprivilegesrecord component. -
refresh
The field for therefreshrecord component. -
refreshExpiration
The field for therefreshExpirationrecord component.
-
-
Constructor Details
-
TokenDto
public TokenDto(String token, Instant tokenExpiration, Set<Privilege> privileges, String refresh, Instant refreshExpiration) Creates an instance of aTokenDtorecord class.- Parameters:
token- the value for thetokenrecord componenttokenExpiration- the value for thetokenExpirationrecord componentprivileges- the value for theprivilegesrecord componentrefresh- the value for therefreshrecord componentrefreshExpiration- the value for therefreshExpirationrecord component
-
-
Method Details
-
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). -
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
tokenExpiration
Returns the value of thetokenExpirationrecord component.- Returns:
- the value of the
tokenExpirationrecord component
-
privileges
Returns the value of theprivilegesrecord component.- Returns:
- the value of the
privilegesrecord component
-
refresh
Returns the value of therefreshrecord component.- Returns:
- the value of the
refreshrecord component
-
refreshExpiration
Returns the value of therefreshExpirationrecord component.- Returns:
- the value of the
refreshExpirationrecord component
-