com.ftlabs.fisa
Class InterestRateStep

java.lang.Object
  extended by com.ftlabs.fisa.InterestRateStep
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<InterestRateStep>

public class InterestRateStep
extends java.lang.Object
implements java.lang.Comparable<InterestRateStep>, java.io.Serializable

Contains a conversion date and a new interest rate for a Step Up/Down security.

See Also:
Serialized Form

Constructor Summary
InterestRateStep(FISADate conversionDate, double interestRate)
          Creates a new InterestRateStep using the provided conversionDate and interest rate.
 
Method Summary
 int compareTo(InterestRateStep object)
          An implementation of compareTo that allows the natural order of a InterestRateStep to be that of its conversionDate.
 boolean equals(java.lang.Object object)
           
 FISADate getConversionDate()
          Returns the conversion date of this step.
 double getInterestRate()
          Returns the new interest rate of this step.
 int hashCode()
           
 void setConversionDate(FISADate conversionDate)
          Set the conversion date of this step.
 void setInterestRate(double interestRate)
          Set the interest rate of this step.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterestRateStep

public InterestRateStep(FISADate conversionDate,
                        double interestRate)
Creates a new InterestRateStep using the provided conversionDate and interest rate.

A null conversionDate is allowed, but all InterestRateSteps with a null conversionDate are considered to be equal. Furthermore, an InterestRateStep with a null conversionDate is considered to be before any InterestRateStep with a non null conversionDate. If a Security has an InterestRateStep with a null conversionDate and a InterestRateStep with the datedDate as the conversionDate, the InterestRateStep with a null conversionDate is ignored.

Parameters:
conversionDate - the date on which this new interestRate takes effect.
interestRate - the new interest rate.
Method Detail

getConversionDate

public FISADate getConversionDate()
Returns the conversion date of this step.

Returns:
the conversion date of this step.

setConversionDate

public void setConversionDate(FISADate conversionDate)
Set the conversion date of this step.

Parameters:
conversionDate - the new conversion date of this step.

getInterestRate

public double getInterestRate()
Returns the new interest rate of this step.

Returns:
the new interest rate of this step.

setInterestRate

public void setInterestRate(double interestRate)
Set the interest rate of this step.

Parameters:
interestRate - the new interest rate of this step.

compareTo

public int compareTo(InterestRateStep object)
An implementation of compareTo that allows the natural order of a InterestRateStep to be that of its conversionDate. null conversionDates are considered to be less than non null conversionDates.

Specified by:
compareTo in interface java.lang.Comparable<InterestRateStep>
Parameters:
object - The object to compare this InterestRateStep to.
Returns:
-1 if the conversionDate of this InterestRateStep is before the conversionDate of the passed InterestRateStep conversionDate, 0 if the conversionDates are equal, or 1 if the conversionDate of this InterestRateStep is after the conversionDate of the passed InterestRateStep.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object