Record Class HistoricalCurrencyConverter.ExchangeRate
java.lang.Object
java.lang.Record
org.episteme.social.history.HistoricalCurrencyConverter.ExchangeRate
- Record Components:
from- destination fromto- destination toyear- the year of the raterate- the exchange rate factor
- All Implemented Interfaces:
Serializable
- Enclosing class:
HistoricalCurrencyConverter
public static record HistoricalCurrencyConverter.ExchangeRate(HistoricalCurrencyConverter.Currency from, HistoricalCurrencyConverter.Currency to, int year, double rate)
extends Record
implements Serializable
Historical exchange rate between two currencies.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExchangeRate(HistoricalCurrencyConverter.Currency from, HistoricalCurrencyConverter.Currency to, int year, double rate) Creates an instance of aExchangeRaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.doublerate()Returns the value of theraterecord component.to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.intyear()Returns the value of theyearrecord component.
-
Constructor Details
-
ExchangeRate
public ExchangeRate(HistoricalCurrencyConverter.Currency from, HistoricalCurrencyConverter.Currency to, int year, double rate) Creates an instance of aExchangeRaterecord class.
-
-
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. -
from
-
to
-
year
-
rate
-