Package com.io7m.cardant.model
Record Class CAAttachmentKey
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CAAttachmentKey
- Record Components:
fileID- The file IDrelation- The relation
- All Implemented Interfaces:
Comparable<CAAttachmentKey>
public record CAAttachmentKey(CAFileID fileID, String relation)
extends Record
implements Comparable<CAAttachmentKey>
The values that uniquely identify an attachment on an object.
-
Constructor Summary
ConstructorsConstructorDescriptionCAAttachmentKey(CAFileID fileID, String relation) The values that uniquely identify an attachment on an object. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CAAttachmentKey other) final booleanIndicates whether some other object is "equal to" this one.fileID()Returns the value of thefileIDrecord component.final inthashCode()Returns a hash code value for this object.relation()Returns the value of therelationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CAAttachmentKey
The values that uniquely identify an attachment on an object.- Parameters:
fileID- The file IDrelation- The relation
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<CAAttachmentKey>
-
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). -
fileID
Returns the value of thefileIDrecord component.- Returns:
- the value of the
fileIDrecord component
-
relation
Returns the value of therelationrecord component.- Returns:
- the value of the
relationrecord component
-