public class CETime
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
int |
hour
Hour of the time
|
int |
minute
Minute of the time
|
private static long |
serialVersionUID
serialVersionUID
|
Constructor and Description |
---|
CETime()
Default Constructor (00:00)
|
CETime(int hour)
Constructor with hour only
|
CETime(int hour,
int minute)
Constructor with hour and minute
|
Modifier and Type | Method and Description |
---|---|
static CETime |
addTime(CETime time1,
CETime time2)
Add two CETime object
|
static CETime |
addTime(CETime time1,
CETime time2,
int numOfTime2)
Add multiple times of one CETime object to another
|
boolean |
isAfter(CETime compareTime)
Method to determine if this CETime object falls after another CETime
object.
|
boolean |
isBefore(CETime compareTime)
Method to determine if this CETime object falls before another CETime
object.
|
int |
toMinute()
Convert time to number of minutes from 00:00
|
java.lang.String |
toString() |
private static final long serialVersionUID
public int hour
public int minute
public CETime()
public CETime(int hour)
hour
- hour the timepublic CETime(int hour, int minute)
hour
- hour of the timeminute
- minute of the timepublic int toMinute()
public java.lang.String toString()
toString
in class java.lang.Object
public static CETime addTime(CETime time1, CETime time2)
time1
- first CETime objecttime2
- second CETime objectpublic static CETime addTime(CETime time1, CETime time2, int numOfTime2)
time1
- first CETime objecttime2
- second CETime objectnumOfTime2
- number of the second CETime object to be addedpublic boolean isBefore(CETime compareTime)
compareTime
- public boolean isAfter(CETime compareTime)
compareTime
-