Package de.murmelmeister.murmelapi.user
Record Class User
java.lang.Object
java.lang.Record
de.murmelmeister.murmelapi.user.User
- Record Components:
firstLogin- Nullable
public record User(int id, UUID mojangId, String username, LocalDateTime firstLogin, boolean systemUser, boolean debugUser, boolean debugEnabled, int languageId)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thedebugEnabledrecord component.private final booleanThe field for thedebugUserrecord component.private final LocalDateTimeThe field for thefirstLoginrecord component.private final intThe field for theidrecord component.private final intThe field for thelanguageIdrecord component.private final UUIDThe field for themojangIdrecord component.private final booleanThe field for thesystemUserrecord component.private final StringThe field for theusernamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUser(int id, UUID mojangId, String username, LocalDateTime firstLogin, boolean systemUser, boolean debugUser, boolean debugEnabled, int languageId) Creates an instance of aUserrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedebugEnabledrecord component.booleanbooleanReturns the value of thedebugUserrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstLoginrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.intReturns the value of thelanguageIdrecord component.mojangId()Returns the value of themojangIdrecord component.booleanReturns the value of thesystemUserrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.withUpdateMeta(String username, LocalDateTime firstLogin, Boolean debugUser, Boolean debugEnabled, Integer languageId)
-
Field Details
-
id
private final int idThe field for theidrecord component. -
mojangId
The field for themojangIdrecord component. -
username
The field for theusernamerecord component. -
firstLogin
The field for thefirstLoginrecord component. -
systemUser
private final boolean systemUserThe field for thesystemUserrecord component. -
debugUser
private final boolean debugUserThe field for thedebugUserrecord component. -
debugEnabled
private final boolean debugEnabledThe field for thedebugEnabledrecord component. -
languageId
private final int languageIdThe field for thelanguageIdrecord component.
-
-
Constructor Details
-
User
public User(int id, UUID mojangId, String username, LocalDateTime firstLogin, boolean systemUser, boolean debugUser, boolean debugEnabled, int languageId) Creates an instance of aUserrecord class.- Parameters:
id- the value for theidrecord componentmojangId- the value for themojangIdrecord componentusername- the value for theusernamerecord componentfirstLogin- the value for thefirstLoginrecord componentsystemUser- the value for thesystemUserrecord componentdebugUser- the value for thedebugUserrecord componentdebugEnabled- the value for thedebugEnabledrecord componentlanguageId- the value for thelanguageIdrecord component
-
-
Method Details
-
debugMode
public boolean debugMode() -
withUpdateMeta
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
mojangId
Returns the value of themojangIdrecord component.- Returns:
- the value of the
mojangIdrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
firstLogin
Returns the value of thefirstLoginrecord component.- Returns:
- the value of the
firstLoginrecord component
-
systemUser
public boolean systemUser()Returns the value of thesystemUserrecord component.- Returns:
- the value of the
systemUserrecord component
-
debugUser
public boolean debugUser()Returns the value of thedebugUserrecord component.- Returns:
- the value of the
debugUserrecord component
-
debugEnabled
public boolean debugEnabled()Returns the value of thedebugEnabledrecord component.- Returns:
- the value of the
debugEnabledrecord component
-
languageId
public int languageId()Returns the value of thelanguageIdrecord component.- Returns:
- the value of the
languageIdrecord component
-