Record Class Home
java.lang.Object
java.lang.Record
fr.mathildeuh.youneedme.api.model.Home
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.owner()Returns the value of theownerrecord component.position()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of theupdatedAtrecord component.withPosition(Position newPosition)
-
Constructor Details
-
Home
Creates an instance of aHomerecord class.- Parameters:
owner- the value for theownerrecord componentname- the value for thenamerecord componentposition- the value for thepositionrecord componentcreatedAt- the value for thecreatedAtrecord componentupdatedAt- the value for theupdatedAtrecord component
-
-
Method Details
-
withPosition
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
createdAt
public long createdAt()Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
updatedAt
public long updatedAt()Returns the value of theupdatedAtrecord component.- Returns:
- the value of the
updatedAtrecord component
-