public class Time
extends mvp.Model
| Modifier and Type | Field and Description |
|---|---|
protected AmOrPm |
amOrPm
Standard suffix used in 12-hour time value
|
protected int |
hour
The hour component of a time value, between 1 and 12 or 0 and 24 based
on the clock style in use
|
protected int |
minute
The minute component of a time value, between 0 and 59
|
| Constructor and Description |
|---|
Time()
Construct an empty time value.
|
Time(java.lang.String time)
Construct a time from the given string.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Define equality for this as componentwise equality.
|
int |
hashCode()
Define the hash code for this as the sum of the components.
|
boolean |
isEmpty()
Return true if his is an empty time.
|
java.lang.String |
toString()
Return the string representation of this.
|
protected int hour
protected int minute
protected AmOrPm amOrPm
public Time()
public Time(java.lang.String time)
public boolean isEmpty()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object