Package com.io7m.cardant.model
Record Class CAItemRepositSerialMove
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CAItemRepositSerialMove
- Record Components:
item- The itemfromLocation- The source storage locationtoLocation- The target storage locationserial- The item serial number
- All Implemented Interfaces:
CAItemRepositType
public record CAItemRepositSerialMove(CAItemID item, CALocationID fromLocation, CALocationID toLocation, CAItemSerial serial)
extends Record
implements CAItemRepositType
An operation that moves an identified item from one storage location to another.
-
Constructor Summary
ConstructorsConstructorDescriptionCAItemRepositSerialMove(CAItemID item, CALocationID fromLocation, CALocationID toLocation, CAItemSerial serial) An operation that moves an identified item from one storage location to another. -
Method Summary
Modifier and TypeMethodDescriptionlongcount()final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromLocationrecord component.final inthashCode()Returns a hash code value for this object.item()Returns the value of theitemrecord component.serial()Returns the value of theserialrecord component.Returns the value of thetoLocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CAItemRepositSerialMove
public CAItemRepositSerialMove(CAItemID item, CALocationID fromLocation, CALocationID toLocation, CAItemSerial serial) An operation that moves an identified item from one storage location to another.- Parameters:
item- The itemfromLocation- The source storage locationtoLocation- The target storage locationserial- The item serial number
-
-
Method Details
-
count
public long count()- Specified by:
countin interfaceCAItemRepositType- Returns:
- The item count
-
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). -
item
Returns the value of theitemrecord component.- Specified by:
itemin interfaceCAItemRepositType- Returns:
- the value of the
itemrecord component
-
fromLocation
Returns the value of thefromLocationrecord component.- Returns:
- the value of the
fromLocationrecord component
-
toLocation
Returns the value of thetoLocationrecord component.- Returns:
- the value of the
toLocationrecord component
-
serial
Returns the value of theserialrecord component.- Returns:
- the value of the
serialrecord component
-