net.objectlab.kit.datecalc.common
Class Tenor

Package class diagram package Tenor
java.lang.Object
  extended by net.objectlab.kit.datecalc.common.Tenor
All Implemented Interfaces:
Serializable

public class Tenor
extends Object
implements Serializable

Holds only valid unit and TenorCode: Day, Week, Month, Year, IMM, Overnight, Spot.

Version:
$Revision: 298 $ $Date: 2010-03-12 19:49:41 -0500 (Fri, 12 Mar 2010) $
Author:
Benoit Xhenseval, $LastChangedBy: benoitx $
See Also:
Serialized Form

Constructor Summary
Tenor(int units, TenorCode code)
           
 
Method Summary
 boolean equals(Object obj)
           
 TenorCode getCode()
           
 int getUnits()
           
 int hashCode()
           
 boolean hasUnits()
           
 String toString()
           
static Tenor valueOf(String tenor)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tenor

public Tenor(int units,
             TenorCode code)
Method Detail

getUnits

public int getUnits()

getCode

public TenorCode getCode()

hasUnits

public boolean hasUnits()

toString

public String toString()
Overrides:
toString in class Object

valueOf

public static Tenor valueOf(String tenor)
Parameters:
tenor - the tenor, e.g. 1D, 3W, SP, IMM etc
Throws:
IllegalArgumentException - if the tenor is not a valid on

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2006-2010 Appendium - Portfolio Financing Platform. All Rights Reserved.