All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.objectlab.kit.datecalc.common.StandardTenor Maven / Gradle / Ivy

There is a newer version: 1.4.8
Show newest version
/*
 * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
 * 
 * Based in London, we are world leaders in the design and development 
 * of bespoke applications for the securities financing markets.
 * 
 * Click here to learn more
 *           ___  _     _           _   _          _
 *          / _ \| |__ (_) ___  ___| |_| |    __ _| |__
 *         | | | | '_ \| |/ _ \/ __| __| |   / _` | '_ \
 *         | |_| | |_) | |  __/ (__| |_| |__| (_| | |_) |
 *          \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
 *                   |__/
 *
 *                     www.ObjectLab.co.uk
 *
 * $Id: StandardTenor.java 238 2007-01-05 20:45:33Z benoitx $
 * 
 * Copyright 2006 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package net.objectlab.kit.datecalc.common;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * A series of Standard Tenors used by the financial industry.
 * 
 * @author Benoit Xhenseval
 * @author $LastChangedBy: benoitx $
 * @version $Revision: 238 $ $Date: 2007-01-05 15:45:33 -0500 (Fri, 05 Jan 2007) $
 * 
 */
public final class StandardTenor {
    private StandardTenor() {
    }
    
    private static final List ALL;
    
    public static final Tenor SPOT = new Tenor(0, TenorCode.SPOT);

    public static final Tenor OVERNIGHT = new Tenor(0, TenorCode.OVERNIGHT);

    public static final Tenor T_1D = new Tenor(1, TenorCode.DAY);

    public static final Tenor T_2D = new Tenor(2, TenorCode.DAY);

    public static final Tenor T_1W = new Tenor(1, TenorCode.WEEK);

    public static final Tenor T_1M = new Tenor(1, TenorCode.MONTH);

    public static final Tenor T_2M = new Tenor(2, TenorCode.MONTH);

    // -----------------------------------------------------------------------
    //
    //    ObjectLab, world leaders in the design and development of bespoke 
    //          applications for the securities financing markets.
    //                         www.ObjectLab.co.uk
    //
    // -----------------------------------------------------------------------

    public static final Tenor T_3M = new Tenor(3, TenorCode.MONTH);

    public static final Tenor T_6M = new Tenor(6, TenorCode.MONTH);

    public static final Tenor T_9M = new Tenor(9, TenorCode.MONTH);

    public static final Tenor T_1Y = new Tenor(1, TenorCode.YEAR);

    public static final Tenor T_2Y = new Tenor(2, TenorCode.YEAR);

    public static final Tenor T_3Y = new Tenor(3, TenorCode.YEAR);

    public static final Tenor T_4Y = new Tenor(4, TenorCode.YEAR);

    public static final Tenor T_5Y = new Tenor(5, TenorCode.YEAR);

    public static final Tenor T_7Y = new Tenor(7, TenorCode.YEAR);

    public static final Tenor T_10Y = new Tenor(10, TenorCode.YEAR);

    public static final Tenor T_15Y = new Tenor(15, TenorCode.YEAR);

    public static final Tenor T_20Y = new Tenor(20, TenorCode.YEAR);

    public static final Tenor T_30Y = new Tenor(30, TenorCode.YEAR);

    public static final Tenor T_50Y = new Tenor(50, TenorCode.YEAR);
    
    public static List getAll() {
        return ALL;
    }

    static {
        List list = new ArrayList();
        list.add(OVERNIGHT);
        list.add(SPOT);
        list.add(T_1D);
        list.add(T_2D);
        list.add(T_1W);
        list.add(T_1M);
        list.add(T_2M);
        list.add(T_3M);
        list.add(T_6M);
        list.add(T_6M);
        list.add(T_9M);
        list.add(T_1Y);
        list.add(T_2Y);
        list.add(T_3Y);
        list.add(T_4Y);
        list.add(T_5Y);
        list.add(T_7Y);
        list.add(T_10Y);
        list.add(T_20Y);
        list.add(T_30Y);
        list.add(T_50Y);
        ALL = Collections.unmodifiableList(list);
    }
}

/*
 * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
 * 
 * Based in London, we are world leaders in the design and development 
 * of bespoke applications for the securities financing markets.
 * 
 * Click here to learn more about us
 *           ___  _     _           _   _          _
 *          / _ \| |__ (_) ___  ___| |_| |    __ _| |__
 *         | | | | '_ \| |/ _ \/ __| __| |   / _` | '_ \
 *         | |_| | |_) | |  __/ (__| |_| |__| (_| | |_) |
 *          \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
 *                   |__/
 *
 *                     www.ObjectLab.co.uk
 */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy