Class CurrencyPair

java.lang.Object
org.drip.product.params.CurrencyPair

public class CurrencyPair
extends java.lang.Object
CurrencyPair class contains the numerator currency, the denominator currency, the quote currency, and the PIP Factor. It exports serialization into and de-serialization out of byte arrays.



Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    CurrencyPair​(java.lang.String strNumCcy, java.lang.String strDenomCcy, java.lang.String strQuoteCcy, double dblPIPFactor)
    Construct the currency pair from the numerator currency, the denominator currency, the quote currency, and the PIP Factor
  • Method Summary

    Modifier and Type Method Description
    java.lang.String code()
    Get the currency pair code
    java.lang.String denomCcy()
    Get the denominator currency
    static CurrencyPair FromCode​(java.lang.String strCode)
    Construct the Currency Pair from the Code
    java.lang.String inverseCode()
    Get the inverse currency pair code
    java.lang.String numCcy()
    Get the numerator currency
    double pipFactor()
    Get the PIP Factor
    java.lang.String quoteCcy()
    Get the quote currency
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CurrencyPair

      public CurrencyPair​(java.lang.String strNumCcy, java.lang.String strDenomCcy, java.lang.String strQuoteCcy, double dblPIPFactor) throws java.lang.Exception
      Construct the currency pair from the numerator currency, the denominator currency, the quote currency, and the PIP Factor
      Parameters:
      strNumCcy - Numerator currency
      strDenomCcy - Denominator currency
      strQuoteCcy - Quote Currency
      dblPIPFactor - PIP Factor
      Throws:
      java.lang.Exception - Thrown if the inputs are invalid
  • Method Details

    • FromCode

      public static final CurrencyPair FromCode​(java.lang.String strCode)
      Construct the Currency Pair from the Code
      Parameters:
      strCode - Currency Pair Code
      Returns:
      The Currency Pair
    • numCcy

      public java.lang.String numCcy()
      Get the numerator currency
      Returns:
      Numerator currency
    • denomCcy

      public java.lang.String denomCcy()
      Get the denominator currency
      Returns:
      Denominator currency
    • quoteCcy

      public java.lang.String quoteCcy()
      Get the quote currency
      Returns:
      Quote currency
    • code

      public java.lang.String code()
      Get the currency pair code
      Returns:
      Currency pair code
    • inverseCode

      public java.lang.String inverseCode()
      Get the inverse currency pair code
      Returns:
      The Inverse Currency pair code
    • pipFactor

      public double pipFactor()
      Get the PIP Factor
      Returns:
      PIP Factor
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object