com.ftlabs.fisa
Class InterestFrequency

java.lang.Object
  extended by com.ftlabs.fisa.InterestFrequency

public class InterestFrequency
extends java.lang.Object

A class to define all of the supported interest frequencies.


Field Summary
static InterestFrequency ANNUAL
          Static Annual InterestFrequency ( 1 ).
static InterestFrequency MONTHLY
          Static Monthly InterestFrequency ( 12 ).
static InterestFrequency QUARTERLY
          Static Quarterly InterestFrequency ( 4 ).
static InterestFrequency SEMI_ANNUAL
          Static Semi Annual InterestFrequency ( 2 ).
 
Method Summary
static InterestFrequency getByName(java.lang.String name)
          Get an InterestFrequency for the given name.
static InterestFrequency getByValue(int value)
          Get an InterestFrequency for the given value ( periods per year ).
static java.util.Collection<InterestFrequency> getInterestFrequencies()
          Get a Collection of all the supported InterestFrequencies.
 int getValue()
          Get the number of periods per year.
 java.lang.String toString()
          Get the name of this InterestFrequency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANNUAL

public static final InterestFrequency ANNUAL
Static Annual InterestFrequency ( 1 ).


SEMI_ANNUAL

public static final InterestFrequency SEMI_ANNUAL
Static Semi Annual InterestFrequency ( 2 ).


QUARTERLY

public static final InterestFrequency QUARTERLY
Static Quarterly InterestFrequency ( 4 ).


MONTHLY

public static final InterestFrequency MONTHLY
Static Monthly InterestFrequency ( 12 ).

Method Detail

getValue

public int getValue()
Get the number of periods per year.

Returns:
the number of periods per year.

toString

public java.lang.String toString()
Get the name of this InterestFrequency.

Overrides:
toString in class java.lang.Object
Returns:
the name of this InterestFrequency.

getInterestFrequencies

public static java.util.Collection<InterestFrequency> getInterestFrequencies()
Get a Collection of all the supported InterestFrequencies.

Returns:
a Collection of all the supported InterestFrequencies.

getByValue

public static InterestFrequency getByValue(int value)
Get an InterestFrequency for the given value ( periods per year ).

Parameters:
value - the number of periods per year.
Returns:
an InterestFrequency for the given value.

getByName

public static InterestFrequency getByName(java.lang.String name)
Get an InterestFrequency for the given name.

Parameters:
name - the name for the desired InterestFrequency.
Returns:
an InterestFrequency for the given name.