Record Class ShopService.QuickSellResult
java.lang.Object
java.lang.Record
fr.mathildeuh.youneedme.api.shop.ShopService.QuickSellResult
- Enclosing interface:
ShopService
-
Constructor Summary
ConstructorsConstructorDescriptionQuickSellResult(int itemsSold, double totalWorth) Creates an instance of aQuickSellResultrecord 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.intReturns the value of theitemsSoldrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalWorthrecord component.
-
Constructor Details
-
QuickSellResult
public QuickSellResult(int itemsSold, double totalWorth) Creates an instance of aQuickSellResultrecord class.- Parameters:
itemsSold- the value for theitemsSoldrecord componenttotalWorth- the value for thetotalWorthrecord 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 with thecomparemethod from their corresponding wrapper classes. -
itemsSold
public int itemsSold()Returns the value of theitemsSoldrecord component.- Returns:
- the value of the
itemsSoldrecord component
-
totalWorth
public double totalWorth()Returns the value of thetotalWorthrecord component.- Returns:
- the value of the
totalWorthrecord component
-