Record Class CAStockInstanceID
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CAStockInstanceID
- Record Components:
id- The ID value
- All Implemented Interfaces:
CAIdType, Comparable<CAStockInstanceID>
public record CAStockInstanceID(UUID id)
extends Record
implements Comparable<CAStockInstanceID>, CAIdType
The unique ID of a serial stock instance. This is effectively a unique
identifier for a specific item.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CAStockInstanceID other) 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.static CAStockInstanceIDConstruct an ID.static CAStockInstanceIDConstruct an ID.static CAStockInstanceIDrandom()Construct an ID using a pseudorandom value.toString()Returns a string representation of this record class.
-
Constructor Details
-
CAStockInstanceID
-
-
Method Details
-
toString
-
of
Construct an ID.- Parameters:
id- The ID value- Returns:
- An ID
-
of
Construct an ID.- Parameters:
id- The ID value- Returns:
- An ID
-
random
-
compareTo
- Specified by:
compareToin interfaceComparable<CAStockInstanceID>
-
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
-