/*
 * ScheduledEventfulLife class.
 *
 * Copyright (C) 2007 SATOH Takayuki All Rights Reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
package ts.util.lifetime;

import java.util.Date;

/**
 * 指定した日時に呼び出される{@link ts.util.lifetime.Life Life}オブジェクトの
 * インターフェイス。
 *
 * @author  佐藤隆之.
 * @version $Revision: 1.1.1.1 $, $Date: 2010-10-16 00:03:48 $
 */
public interface ScheduledEventfulLife extends EventfulLife
{
  /**
   * 次回実行される日時を取得する。
   * <br>
   * このメソッドは、{@link ts.util.lifetime.Lifetime Lifetime}オブジェクトに
   * 登録された直後と{@link ts.util.lifetime.EventfulLife#happens() happens()}
   * メソッドが呼ばれる度に実行され、次に
   * {@link ts.util.lifetime.EventfulLife#happens() happens()}メソッドが呼ばれる
   * 日時を返す。
   * <br>
   * このメソッドが過去の日時を返した場合は、それ以降
   * {@link ts.util.lifetime.EventfulLife#happens() happens()}メソッドは呼ばれ
   * なくなる。
   *
   * @return 次回実行される日時。
   */
  Date getNextTime();
}

