Record Class CachedExchangeRate
java.lang.Object
java.lang.Record
com.truebubo.maniflow.money.CachedExchangeRate
- Record Components:
rate
- How more valuable is one currency compared to othertime
- Where was this result set
Used for not querying the database when we already have a recent data entry
-
Constructor Summary
ConstructorsConstructorDescriptionCachedExchangeRate
(BigDecimal rate, ZonedDateTime time) Creates an instance of aCachedExchangeRate
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.rate()
Returns the value of therate
record component.time()
Returns the value of thetime
record component.final String
toString()
Returns a string representation of this record class.
-
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)
. -
rate
-
time
-