java.lang.Object
com.currencycalc.currencycalculatorjavafx.model.CurrencyData

public class CurrencyData extends Object
Represents the root structure of the JSON response from the FreeCurrencyAPI.

This class encapsulates the exchange rate data within the "data" field of the JSON response. It acts as a container for the Data object, which holds all individual currency rates.

Example JSON structure:

 {
   "data": {
     "USD": 1.0,
     "EUR": 0.85,
     ...
   }
 }
 

Used in conjunction with Gson for JSON serialization and deserialization.

Version:
1.0.0
Autor:
Tim
  • Felddetails

    • data

      @SerializedName("data") @Expose private Data data
      The exchange rate data field containing the actual rates for various currencies.

      This field is mapped to the "data" field in the JSON response using the SerializedName annotation.

  • Konstruktordetails

    • CurrencyData

      public CurrencyData()
  • Methodendetails

    • getData

      public Data getData()
      Retrieves the exchange rate data.
      Gibt zurück:
      The Data object containing exchange rates for various currencies.
    • setData

      public void setData(Data data)
      Sets the exchange rate data.
      Parameter:
      data - The Data object containing exchange rates for various currencies.