Documentation of 'org.jquantlib.currencies.ExchangeRate' Java class
ExchangeRate
org.jquantlib.currencies

Class ExchangeRate



  • public class ExchangeRate
    extends java.lang.Object
    • Constructor Detail

      • ExchangeRate

        public ExchangeRate()
        Creates a new ExchangeRate instance.
      • ExchangeRate

        public ExchangeRate(ExchangeRate toCopy)
        Creates clone of an existing ExchangeRate instance.
        Parameters:
        toCopy - the ExchangeRate to be cloned.
      • ExchangeRate

        public ExchangeRate(Currency source,
                            Currency target,
                            double rate)
        Creates a new ExchangeRate instance
        Parameters:
        source - The source currency of this ExchangeRate Currency
        target - The target currency of this ExchangeRate Currency
        rate - The rate of this ExchangeRate
    • Method Detail

      • rate

        public double rate()
      • exchange

        public Money exchange(Money amount)
        Apply this ExchangeRate an amount of cash. A new money instance will be returned. The input remains unchanged.
        Parameters:
        amount - The money instance the exchange rate should be applied to. Money
        Returns:
        A new money instance where this ExchangeRate has been applied to. Money
      • chain

        public static ExchangeRate chain(ExchangeRate r1,
                                         ExchangeRate r2)
        Returns a new ExchangeRate with a initialized ratechain. The ratechain will be initialized by copies of r1 and r1.
        Parameters:
        r1 - The first ExchangeRate to be used in the ratechain ExchangeRate
        r2 - The second ExchangeRate to be used inthe ratechain ExchangeRate
        Returns:
        A new ExchangeRate

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.