Record Class PaymentMethodSales
java.lang.Object
java.lang.Record
app.model.PaymentMethodSales
public record PaymentMethodSales(String paymentMethod, long orderCount, BigDecimal salesRevenue)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe field for theorderCountrecord component.private final StringThe field for thepaymentMethodrecord component.private final BigDecimalThe field for thesalesRevenuerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPaymentMethodSales(String paymentMethod, long orderCount, BigDecimal salesRevenue) Creates an instance of aPaymentMethodSalesrecord 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.longReturns the value of theorderCountrecord component.Returns the value of thepaymentMethodrecord component.Returns the value of thesalesRevenuerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
paymentMethod
The field for thepaymentMethodrecord component. -
orderCount
private final long orderCountThe field for theorderCountrecord component. -
salesRevenue
The field for thesalesRevenuerecord component.
-
-
Constructor Details
-
PaymentMethodSales
Creates an instance of aPaymentMethodSalesrecord class.- Parameters:
paymentMethod- the value for thepaymentMethodrecord componentorderCount- the value for theorderCountrecord componentsalesRevenue- the value for thesalesRevenuerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
paymentMethod
Returns the value of thepaymentMethodrecord component.- Returns:
- the value of the
paymentMethodrecord component
-
orderCount
public long orderCount()Returns the value of theorderCountrecord component.- Returns:
- the value of the
orderCountrecord component
-
salesRevenue
Returns the value of thesalesRevenuerecord component.- Returns:
- the value of the
salesRevenuerecord component
-