|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
mvp.Model
caltool.schedule.Time
public class Time
A Time consists of an hour, minute, and AM or PM indicator. A time value is expressed using a 12-hour or 24-hour clock style. The clock style is set as an option by the user. If the clock style is 24-hour, the AmOrPm indicator is nil.
Field Summary | |
---|---|
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 |
Fields inherited from class mvp.Model |
---|
view |
Constructor Summary | |
---|---|
Time()
Construct an empty time value. |
|
Time(java.lang.String time)
Construct a time from the given string. |
Method Summary | |
---|---|
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. |
Methods inherited from class mvp.Model |
---|
dump, exit, getView, setView |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int hour
protected int minute
protected AmOrPm amOrPm
Constructor Detail |
---|
public Time()
public Time(java.lang.String time)
Method Detail |
---|
public boolean isEmpty()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |