Class RatesConfig
java.lang.Object
net.thauvin.erik.frankfurter.config.RatesConfig
Immutable configuration for constructing Frankfurter
/rates queries.
Use new RatesConfig.Builder() to create instances. All parameters are optional.
- Since:
- 1.0
- Author:
- Erik C. Thauvin
- API Note:
- This class is thread-safe. All state is immutable.
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
hashCode
public int hashCode()Returns a hash code value for this configuration.The hash code is computed from the parameters map. It is consistent with
equals(Object): equal objects have equal hash codes. -
equals
Compares this configuration to the specified object for equality.Two
RatesConfiginstances are equal if they have the same parameters. -
toString
-
applyTo
Applies this configuration to the given base URI.Constructs a URI for the
/ratesendpoint with optional query parameters.- Parameters:
baseUri- the base API endpoint, e.g.https://api.frankfurter.app/- Returns:
- a new URI with the query parameters appended
- Throws:
NullPointerException- ifbaseUriisnullIllegalArgumentException- if the URI cannot be built
-