Package com.io7m.cardant.model

# Record Class CALocation

java.lang.Object
java.lang.Record
com.io7m.cardant.model.CALocation

Record Components:
  `id` - The location ID
  `parent` - The location parent, if any
  `name` - The location name
  `metadata` - The metadata associated with the location
  `attachments` - The attachments associated with the location
  `types` - 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

  Constructors
  Constructor
  Description
  `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.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SortedMap<CAAttachmentKey,CAAttachment>`
  `attachments()`
  Returns the value of the `attachments` record component.
  `String`
  `displayId()`
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `CALocationID`
  `id()`
  Returns the value of the `id` record component.
  `SortedMap<com.io7m.lanark.core.RDottedName,CAMetadataType>`
  `metadata()`
  Returns the value of the `metadata` record component.
  `String`
  `name()`
  Returns the value of the `name` record component.
  `Optional<CALocationID>`
  `parent()`
  Returns the value of the `parent` record component.
  `CALocationSummary`
  `summary()`
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `SortedSet<com.io7m.lanark.core.RDottedName>`
  `types()`
  Returns the value of the `types` record component.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods 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 ID
      `parent` - The location parent, if any
      `name` - The location name

- ## Method Details

  - ### displayId

    public String displayId()
    Returns:
      The location display ID

  - ### summary

    public CALocationSummary summary()
    Specified by:
      `summary` in interface `CAInventoryObjectType<CALocationSummary>`
    Returns:
      A summary of the object

  - ### toString

    public final String 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.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### 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.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    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 with `Objects::equals(Object,Object)`.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### id

    public CALocationID id()
    Returns the value of the `id` record component.
    Returns:
      the value of the `id` record component

  - ### parent

    public Optional<CALocationID> parent()
    Returns the value of the `parent` record component.
    Returns:
      the value of the `parent` record component

  - ### name

    public String name()
    Returns the value of the `name` record component.
    Returns:
      the value of the `name` record component

  - ### metadata

    public SortedMap<com.io7m.lanark.core.RDottedName,CAMetadataType> metadata()
    Returns the value of the `metadata` record component.
    Specified by:
      `metadata` in interface `CAInventoryObjectType<CALocationSummary>`
    Returns:
      the value of the `metadata` record component

  - ### attachments

    public SortedMap<CAAttachmentKey,CAAttachment> attachments()
    Returns the value of the `attachments` record component.
    Specified by:
      `attachments` in interface `CAInventoryObjectType<CALocationSummary>`
    Returns:
      the value of the `attachments` record component

  - ### types

    public SortedSet<com.io7m.lanark.core.RDottedName> types()
    Returns the value of the `types` record component.
    Specified by:
      `types` in interface `CAInventoryObjectType<CALocationSummary>`
    Returns:
      the value of the `types` record component