Record Class CALocationSummary
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CALocationSummary
- Record Components:
id- The idparent- The parentpath- The location pathtimeCreated- The time the item was createdtimeUpdated- The time the item was last updated
public record CALocationSummary(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated)
extends Record
A summary of a location.
-
Constructor Summary
ConstructorsConstructorDescriptionCALocationSummary(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated) A summary of a location. -
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.id()Returns the value of theidrecord component.name()parent()Returns the value of theparentrecord component.path()Returns the value of thepathrecord component.Returns the value of thetimeCreatedrecord component.Returns the value of thetimeUpdatedrecord component.final StringtoString()Returns a string representation of this record class.withPath(CALocationPath newPath) Adjust this location summary to have a new path.
-
Constructor Details
-
CALocationSummary
public CALocationSummary(CALocationID id, Optional<CALocationID> parent, CALocationPath path, OffsetDateTime timeCreated, OffsetDateTime timeUpdated) A summary of a location.- Parameters:
id- The idparent- The parentpath- The location pathtimeCreated- The time the item was createdtimeUpdated- The time the item was last updated
-
-
Method Details
-
name
- Returns:
- The location name (the last path component)
-
withPath
Adjust this location summary to have a new path.- Parameters:
newPath- The new path- Returns:
- This location summary with a new path
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
-
parent
-
path
-
timeCreated
Returns the value of thetimeCreatedrecord component.- Returns:
- the value of the
timeCreatedrecord component
-
timeUpdated
Returns the value of thetimeUpdatedrecord component.- Returns:
- the value of the
timeUpdatedrecord component
-