public final class ElapsedTime extends Object
修飾子とタイプ | メソッドと説明 |
---|---|
int |
compareTo(Integral other) |
boolean |
contentEquals(CharSequence other)
オブジェクトが保持する情報の文字シーケンス表現と引数で指定された文字シーケンスを比較し
それぞれの文字の並びが一致する場合
true を返す. |
boolean |
contentEquals(Component other)
オブジェクトが保持する情報の文字シーケンス表現と引数で指定されたオブジェクトが保持する文字シーケンスを比較し
それぞれの文字の並びが一致する場合
true を返す. |
int |
getHours()
このインスタンスが表わす経過時間の時間部分だけを返す.
|
int |
getMinutes()
このインスタンスが表わす経過時間の分の部分だけを返す.
|
int |
intValue()
このオブジェクトが表わす整数値を返す.
|
long |
longValue()
このオブジェクトが表わす整数値を返す.
|
static ElapsedTime |
of(int minutes)
指定された分に対応するインスタンスを返す.
|
static ElapsedTime |
of(int hours,
int minutes)
指定された時間と分に対応するインスタンスを返す.
|
CharSequence |
serialize()
オブジェクトの保持する情報を文字シーケンス化する.
|
Date |
toDate()
このインスタンスが表わす経過時間をもとに
Date インスタンスを生成して返す. |
int |
toHours()
このインスタンスが表わす経過時間を時間換算した値を返す.
|
int |
toMinutes()
このインスタンスが表わす経過時間を分換算した値を返す.
|
String |
toString()
このオブジェクトの文字列表現を返す.
|
String |
toString(int radix)
このオブジェクトの文字列表現を返す.
|
public static ElapsedTime of(int minutes)
minutes
- 分IllegalArgumentException
- 時間と分をあわせて24時間を超える時間が指定された場合public static ElapsedTime of(int hours, int minutes)
hours
- 時間minutes
- 分IllegalArgumentException
- 分として59より大きな数値が指定された場合か、
時間と分をあわせて24時間を超える時間が指定された場合public int getHours()
public int getMinutes()
1
を返す。public int toMinutes()
61
を返す。public int toHours()
1
を返す。public int intValue()
Integral
public long longValue()
Integral
public CharSequence serialize()
Component
このメソッドが返すシーケンスはObject.toString()
が返すそれのようなデバッグ用途で利用されうるものではない。
このメソッドが返すシーケンスは当該コンポーネントのユニット定義ファイル上における表現形式で表されたものでなくてはならない。
public int compareTo(Integral other)
compareTo
インタフェース内 Comparable<Integral>
public boolean contentEquals(CharSequence other)
Component
true
を返す.contentEquals
インタフェース内 Component
other
- 文字シーケンスpublic boolean contentEquals(Component other)
Component
true
を返す.contentEquals
インタフェース内 Component
other
- 文字シーケンス化可能なオブジェクトCopyright © 2016. All rights reserved.