Record Class StockPrice
java.lang.Object
java.lang.Record
com.truebubo.maniflow.stock.StockPrice
- Record Components:
value
- How many times larger is the price compared to the basic unit of the currencycurrency
- Currency the price is in
Info about the cost of a stock
-
Constructor Summary
ConstructorsConstructorDescriptionStockPrice
(BigDecimal value, CurrencyDesignation currency) Creates an instance of aStockPrice
record class. -
Method Summary
Modifier and TypeMethodDescriptioncurrency()
Returns the value of thecurrency
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
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)
. -
value
-
currency
-