|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jpalm.mobiledb.field.type.Time
public class Time
A time field in a MobileDB record.
Field Summary | |
---|---|
static int |
MAX_SECONDS
The maximum number of seconds. 86399 |
static int |
MIN_SECONDS
The minimum number of seconds. 0 |
Constructor Summary | |
---|---|
Time()
Creates a new time representing the current time. |
|
Time(int seconds)
Creates a new time from seconds . |
Method Summary | |
---|---|
int |
compareTo(Time time)
Compares this time to to another time based on the number of seconds since 00:00. |
boolean |
equals(java.lang.Object object)
|
static Time |
fromMobileDB(java.lang.String string)
Creates a time from the MobileDB value. |
int |
getSeconds()
Gets this time as the number of seconds since 00:00. |
Time |
getValue()
Gets the native object for this type. |
java.lang.String |
toMobileDB()
Gets the MobileDB value for this type. |
java.lang.String |
toString()
Gets a string representation of this time in HH:mm format. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_SECONDS
public static final int MIN_SECONDS
Constructor Detail |
---|
public Time()
public Time(int seconds)
seconds
. If seconds
is not between
0 and 86399 (inclusive) then seconds
defaults to 0.
seconds
- the number of seconds since 00:00.Method Detail |
---|
public int getSeconds()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int compareTo(Time time)
compareTo
in interface java.lang.Comparable<Time>
time
- a time to compare to
0
if time
is less than this time,
0
if time
is equal to this time, or greater than
0
if time
is greater than this timepublic java.lang.String toMobileDB()
Type
toMobileDB
in interface Type<Time>
public static Time fromMobileDB(java.lang.String string)
string
- the MobileDB value to convert
public Time getValue()
Type
getValue
in interface Type<Time>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |