Record Class CAItemSerial
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CAItemSerial
- Record Components:
type- The typevalue- The value
- All Implemented Interfaces:
Comparable<CAItemSerial>
public record CAItemSerial(com.io7m.lanark.core.RDottedName type, String value)
extends Record
implements Comparable<CAItemSerial>
A serial number.
-
Constructor Summary
ConstructorsConstructorDescriptionCAItemSerial(com.io7m.lanark.core.RDottedName type, String value) A serial number. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CAItemSerial other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static CAItemSerialParse a serial number of the form "<type>:<value>".toString()Returns a string representation of this record class.com.io7m.lanark.core.RDottedNametype()Returns the value of thetyperecord component.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
CAItemSerial
A serial number.- Parameters:
type- The typevalue- The value
-
-
Method Details
-
toString
-
parse
Parse a serial number of the form "<type>:<value>".- Parameters:
text- The text- Returns:
- The parsed serial number
- Throws:
IllegalArgumentException- On parse errors
-
compareTo
- Specified by:
compareToin interfaceComparable<CAItemSerial>
-
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). -
type
-
value
-