|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.calendar.TimeInDay
public class TimeInDay
represents the time of the day of any given date.
For String representation, it uses the format H:mm.
SimpleDateFormat,
Serialized Form| Field Summary | |
|---|---|
protected static SimpleDateFormat |
format
the format used to convert between TimeInDay and String |
| Constructor Summary | |
|---|---|
TimeInDay()
uses the current time |
|
TimeInDay(Date time)
takes the time of the day from the given time |
|
TimeInDay(int timeInDay)
time in milliseconds from 12:00 am (must be less than 24h) |
|
TimeInDay(String hourString)
|
|
| Method Summary | |
|---|---|
boolean |
after(Date time)
|
boolean |
after(TimeInDay time)
|
boolean |
before(Date time)
|
boolean |
before(TimeInDay time)
|
int |
compareTo(TimeInDay time)
|
boolean |
equals(Object obj)
|
Date |
getDate(Date inDay)
returns the date that is calculated by taking the beginning of the given day and adds this TimeInDay's value. |
int |
getTime()
|
int |
hashCode()
|
static TimeInDay |
parse(String s)
|
void |
setTime(int timeInDay)
takes time in milliseconds from 12:00 am (must be less than 24h) |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final SimpleDateFormat format
| Constructor Detail |
|---|
public TimeInDay()
public TimeInDay(Date time)
public TimeInDay(int timeInDay)
public TimeInDay(String hourString)
throws ParseException
ParseException| Method Detail |
|---|
public void setTime(int timeInDay)
public Date getDate(Date inDay)
public boolean before(TimeInDay time)
public boolean after(TimeInDay time)
public boolean before(Date time)
public boolean after(Date time)
public int getTime()
public int compareTo(TimeInDay time)
compareTo in interface Comparable<TimeInDay>
public static TimeInDay parse(String s)
throws ParseException
ParseExceptionpublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||