public final class Time extends Object implements Comparable<Time>
修飾子とタイプ | フィールドと説明 |
---|---|
static Time |
MAX
47:59を表わすインスタンス.
|
static Time |
MIDNIGHT
0:00を表わすインスタンス.
|
static Time |
MIN
0:00を表わすインスタンス.
|
static Time |
NOON
12:00を表わすインスタンス.
|
修飾子とタイプ | メソッドと説明 |
---|---|
int |
compareTo(Time o) |
boolean |
equals(Object obj) |
int |
getHours()
時間を返す.
|
int |
getMinutes()
分を返す.
|
int |
hashCode() |
static Time |
of(int hours,
int minutes)
指定された時間・分の値に対応するインスタンスを返す.
|
static Time |
ofMinutes(int minutes)
指定された分の値に対応するインスタンスを返す.
|
Date |
toDate()
このオブジェクトが表わす時間・分を
Date 型に変換する. |
String |
toString() |
public static final Time MIDNIGHT
public static final Time NOON
public static final Time MIN
public static final Time MAX
public static Time of(int hours, int minutes)
hours
- 時間minutes
- 分IllegalArgumentException
- このオブジェクトが表現可能な範囲を超える値が指定された場合public static Time ofMinutes(int minutes)
minutes
- 分IllegalArgumentException
- このオブジェクトが表現可能な範囲を超える値が指定された場合public int getHours()
public int getMinutes()
public int compareTo(Time o)
compareTo
インタフェース内 Comparable<Time>
Copyright © 2016. All rights reserved.