jp.sourceforge.orangesignal.ta.dataset
クラス DateTruncater

java.lang.Object
  上位を拡張 jp.sourceforge.orangesignal.ta.dataset.DateTruncater

public class DateTruncater
extends Object

足単位変換で使用する日時切捨て用クラスを提供します。

作成者:
杉澤 浩二

フィールドの概要
protected  Calendar calendar
           
protected  int date
          日の初期値を保持します。
protected  int hour
          時の初期値を保持します。
protected  int millisecond
          ミリ秒の初期値を保持します。
protected  int minute
          分の初期値を保持します。
protected  int month
          月の初期値を保持します。
protected  int second
          秒の初期値を保持します。
protected  int year
          年の初期値を保持します。
 
コンストラクタの概要
DateTruncater()
          デフォルトコンストラクタです。
DateTruncater(Calendar calendar)
          コンストラクタです。
 
メソッドの概要
 Calendar truncate(Calendar calendar, int field)
          指定されたカレンダーを指定された精度で切捨てて返します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

calendar

protected Calendar calendar

year

protected int year
年の初期値を保持します。


month

protected int month
月の初期値を保持します。


date

protected int date
日の初期値を保持します。


hour

protected int hour
時の初期値を保持します。


minute

protected int minute
分の初期値を保持します。


second

protected int second
秒の初期値を保持します。


millisecond

protected int millisecond
ミリ秒の初期値を保持します。

コンストラクタの詳細

DateTruncater

public DateTruncater()
デフォルトコンストラクタです。


DateTruncater

public DateTruncater(Calendar calendar)
コンストラクタです。

パラメータ:
calendar - カレンダー
メソッドの詳細

truncate

public Calendar truncate(Calendar calendar,
                         int field)
指定されたカレンダーを指定された精度で切捨てて返します。

パラメータ:
calendar - カレンダー
field - 切捨て精度
戻り値:
指定された精度で切捨てられたカレンダー


Copyright © 2006-2009 OrangeSignal.com. All Rights Reserved.