net.objectlab.kit.datecalc.common
Enum TenorCode
java.lang.Object
java.lang.Enum<TenorCode>
net.objectlab.kit.datecalc.common.TenorCode
- All Implemented Interfaces:
- Serializable, Comparable<TenorCode>
public enum TenorCode
- extends Enum<TenorCode>
enum of Tenor Codes held by a Tenor
- Version:
- $Revision: 283 $ $Date: 2009-09-03 10:31:09 -0400 (Thu, 03 Sep 2009) $
- Author:
- Benoit Xhenseval, $LastChangedBy: benoitx $
OVERNIGHT
public static final TenorCode OVERNIGHT
SPOT
public static final TenorCode SPOT
TOM_NEXT
public static final TenorCode TOM_NEXT
SPOT_NEXT
public static final TenorCode SPOT_NEXT
DAY
public static final TenorCode DAY
WEEK
public static final TenorCode WEEK
MONTH
public static final TenorCode MONTH
YEAR
public static final TenorCode YEAR
values
public static TenorCode[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (TenorCode c : TenorCode.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static TenorCode valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
getCode
public String getCode()
- Returns:
- the string representation of this
TenorCode
fromCode
public static TenorCode fromCode(String code)
- Parameters:
code - string representation of the TenorCode
- Returns:
- a
TenorCode represented by the string argument
acceptUnits
public boolean acceptUnits()
- Returns:
- true if the TenorCode can have units e.g. 1 Day, 3 Week but not 5
IMM or 6 SP
Copyright © 2006-2010 Appendium - Portfolio Financing Platform. All Rights Reserved.