001/* 002 * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit. 003 * 004 * Based in London, we are world leaders in the design and development 005 * of bespoke applications for the securities financing markets. 006 * 007 * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a> 008 * ___ _ _ _ _ _ 009 * / _ \| |__ (_) ___ ___| |_| | __ _| |__ 010 * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ 011 * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | 012 * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ 013 * |__/ 014 * 015 * www.ObjectLab.co.uk 016 * 017 * $Id: HolidayHandler.java 200 2006-10-10 20:15:58Z benoitx $ 018 * 019 * Copyright 2006 the original author or authors. 020 * 021 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 022 * use this file except in compliance with the License. You may obtain a copy of 023 * the License at 024 * 025 * http://www.apache.org/licenses/LICENSE-2.0 026 * 027 * Unless required by applicable law or agreed to in writing, software 028 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 029 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 030 * License for the specific language governing permissions and limitations under 031 * the License. 032 */ 033package net.objectlab.kit.datecalc.common; 034 035import java.io.Serializable; 036import java.util.Set; 037 038/** 039 * A Holiday Calendar not only defines a set of holiday dates but an early and 040 * late boundary for these dates, e.g. putting the holidays for 2006 in a set 041 * with limits of 1 Jan 2006 and 31 Dec 2006 means that 2006 is covered, not 042 * that 31 Dec is a holiday itself. 043 * 044 * @author Benoit Xhenseval 045 * @since 1.4.0 046 * 047 * @param <E> 048 * a representation of a date, typically JDK: Date, Calendar; 049 * Joda:LocalDate, YearMonthDay 050 * 051 */ 052public interface ReadOnlyHolidayCalendar<E> extends Serializable { 053 /** 054 * Returns an immutable set of holidays. 055 * 056 * @return an immutable copy of the holiday set. 057 */ 058 Set<E> getHolidays(); 059 060 /** 061 * Returns the earliest date covered by this HolidayCalendar. 062 * @return E the earliest date covered by this holiday calendar. 063 */ 064 E getEarlyBoundary(); 065 066 /** 067 * Returns the latest date covered by this HolidayCalendar. 068 * @return E the latest date covered by this holiday calendar. 069 */ 070 E getLateBoundary(); 071} 072 073/* 074 * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit. 075 * 076 * Based in London, we are world leaders in the design and development of 077 * bespoke applications for the securities financing markets. 078 * 079 * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a> 080 * 081 * ___ _ _ _ _ _ 082 * / _ \| |__ (_) ___ ___| |_| | __ _| |__ 083 * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ 084 * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | 085 * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ 086 * |__/ 087 * 088 * 089 * www.ObjectLab.co.uk 090 */