Package no.priv.bang.ukelonn.api.beans
Record Class AdminStatus
java.lang.Object
java.lang.Record
no.priv.bang.ukelonn.api.beans.AdminStatus
public record AdminStatus(no.priv.bang.osgiservice.users.User user, boolean administrator)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theadministratorrecord component.private final no.priv.bang.osgiservice.users.UserThe field for theuserrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAdminStatus(no.priv.bang.osgiservice.users.User user, boolean administrator) Creates an instance of aAdminStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theadministratorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.no.priv.bang.osgiservice.users.Useruser()Returns the value of theuserrecord component.static AdminStatus.Builderwith()
-
Field Details
-
user
private final no.priv.bang.osgiservice.users.User userThe field for theuserrecord component. -
administrator
private final boolean administratorThe field for theadministratorrecord component.
-
-
Constructor Details
-
AdminStatus
public AdminStatus(no.priv.bang.osgiservice.users.User user, boolean administrator) Creates an instance of aAdminStatusrecord class.- Parameters:
user- the value for theuserrecord componentadministrator- the value for theadministratorrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
user
public no.priv.bang.osgiservice.users.User user()Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
administrator
public boolean administrator()Returns the value of theadministratorrecord component.- Returns:
- the value of the
administratorrecord component
-