Record Class Cost
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.cost.Cost
-
Constructor Summary
ConstructorsConstructorDescriptionCost
(BigDecimal number, String currencyCode) Creates an instance of aCost
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrencyCode
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.number()
Returns the value of thenumber
record component.static Cost
of
(BigDecimal number, String currencyCode) toString()
Returns a string representation of this record class.
-
Constructor Details
-
Cost
Creates an instance of aCost
record class.- Parameters:
number
- the value for thenumber
record componentcurrencyCode
- the value for thecurrencyCode
record component
-
-
Method Details
-
of
-
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)
. -
number
Returns the value of thenumber
record component.- Returns:
- the value of the
number
record component
-
currencyCode
Returns the value of thecurrencyCode
record component.- Returns:
- the value of the
currencyCode
record component
-