Package com.io7m.cardant.model
Record Class CALocation
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CALocation
- Record Components:
id- The location IDparent- The location parent, if anyname- The location namemetadata- The metadata associated with the locationattachments- The attachments associated with the locationtypes- The types associated with the location
- All Implemented Interfaces:
CAInventoryObjectType<CALocationSummary>
public record CALocation(CALocationID id, Optional<CALocationID> parent, String name, SortedMap<com.io7m.lanark.core.RDottedName,CAMetadataType> metadata, SortedMap<CAAttachmentKey,CAAttachment> attachments, SortedSet<com.io7m.lanark.core.RDottedName> types)
extends Record
implements CAInventoryObjectType<CALocationSummary>
A location.
-
Constructor Summary
ConstructorsConstructorDescriptionCALocation(CALocationID id, Optional<CALocationID> parent, String name, SortedMap<com.io7m.lanark.core.RDottedName, CAMetadataType> metadata, SortedMap<CAAttachmentKey, CAAttachment> attachments, SortedSet<com.io7m.lanark.core.RDottedName> types) Construct a location. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachmentsrecord component.final 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.SortedMap<com.io7m.lanark.core.RDottedName, CAMetadataType> metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.parent()Returns the value of theparentrecord component.summary()final StringtoString()Returns a string representation of this record class.SortedSet<com.io7m.lanark.core.RDottedName> types()Returns the value of thetypesrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.cardant.model.CAInventoryObjectType
attachmentsWithRelation, firstAttachmentWithRelation, hasAttachmentWithRelation
-
Constructor Details
-
CALocation
public CALocation(CALocationID id, Optional<CALocationID> parent, String name, SortedMap<com.io7m.lanark.core.RDottedName, CAMetadataType> metadata, SortedMap<CAAttachmentKey, CAAttachment> attachments, SortedSet<com.io7m.lanark.core.RDottedName> types) Construct a location.- Parameters:
id- The location IDparent- The location parent, if anyname- The location name
-
-
Method Details
-
displayId
- Returns:
- The location display ID
-
summary
- Specified by:
summaryin interfaceCAInventoryObjectType<CALocationSummary>- Returns:
- A summary of the object
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
parent
Returns the value of theparentrecord component.- Returns:
- the value of the
parentrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
metadata
Returns the value of themetadatarecord component.- Specified by:
metadatain interfaceCAInventoryObjectType<CALocationSummary>- Returns:
- the value of the
metadatarecord component
-
attachments
Returns the value of theattachmentsrecord component.- Specified by:
attachmentsin interfaceCAInventoryObjectType<CALocationSummary>- Returns:
- the value of the
attachmentsrecord component
-
types
Returns the value of thetypesrecord component.- Specified by:
typesin interfaceCAInventoryObjectType<CALocationSummary>- Returns:
- the value of the
typesrecord component
-