Record Class SaleCompleted
java.lang.Object
java.lang.Record
be.appify.prefab.example.sale.SaleCompleted
-
Constructor Summary
ConstructorsConstructorDescriptionSaleCompleted(String id, Instant start, List<SaleItem> items, BigDecimal returned, SaleType type) Creates an instance of aSaleCompletedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.items()Returns the value of theitemsrecord component.returned()Returns the value of thereturnedrecord component.start()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
SaleCompleted
public SaleCompleted(String id, Instant start, List<SaleItem> items, BigDecimal returned, SaleType type) Creates an instance of aSaleCompletedrecord class.- Parameters:
id- the value for theidrecord componentstart- the value for thestartrecord componentitems- the value for theitemsrecord componentreturned- the value for thereturnedrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
toString
-
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
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
items
-
returned
Returns the value of thereturnedrecord component.- Returns:
- the value of the
returnedrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-