public class Time
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private int |
hour |
private static int |
MIN_HOURS |
private static int |
MIN_MINUTES |
private int |
minute |
private static int |
NB_OF_HOURS_IN_DAY |
private static int |
NB_OF_MINUTES_IN_HOUR |
private static long |
serialVersionUID
Attributes a unique ID to the class to make serialization work.
|
Constructor and Description |
---|
Time(int hour,
int minute) |
Time(Time otherTime)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
getHour() |
int |
getMinute() |
int |
hashCode() |
boolean |
isAfter(Time other) |
private static final int NB_OF_HOURS_IN_DAY
private static final int NB_OF_MINUTES_IN_HOUR
private static final int MIN_HOURS
private static final int MIN_MINUTES
private static final long serialVersionUID
private int hour
private int minute
public Time(int hour, int minute) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public Time(Time otherTime)
otherTime
- public int getHour()
public int getMinute()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isAfter(Time other)