|
Venice 0.74beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnz.org.venice.util.TradingTime
A replacement time for java.util.Calendar. The main principles of this time class are speed (as fast as possible) and size (as small as possible). It produces a much smaller and faster time class than using the Calendar hierarchy.
| Field Summary | |
static int |
HOURS_IN_DAY
Number of hours in one day. |
static int |
MILLISECONDS_IN_SECOND
Number of milliseconds in one second. |
static int |
MINUTES_IN_HOUR
Number of minutes in one hour. |
static int |
SECONDS_IN_MINUTE
Number of seconds in one minute. |
| Constructor Summary | |
TradingTime()
Create a new time set to now. |
|
TradingTime(int hour,
int minute,
int second)
Create a new time from the given hour, minute and second. |
|
TradingTime(java.lang.String time)
|
|
| Method Summary | |
boolean |
after(java.lang.Object time)
Tests if this time is after the specified time. |
boolean |
before(java.lang.Object time)
Tests if this time is before the specified time. |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object time)
Compare the current time to the specified object. |
int |
compareTo(TradingTime time)
Compare the current time to the specified time. |
int |
diff(TradingTime time)
|
boolean |
equals(java.lang.Object time)
Compares this time with the specified object. |
int |
getHour()
Return the hour. |
int |
getMinute()
Return the minute. |
int |
getSecond()
Return the second. |
java.lang.String |
toString()
Returns a string version of the time. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int HOURS_IN_DAY
public static final int MINUTES_IN_HOUR
public static final int SECONDS_IN_MINUTE
public static final int MILLISECONDS_IN_SECOND
| Constructor Detail |
public TradingTime(int hour,
int minute,
int second)
hour - the hour from 0 to 23.minute - the minute from 0 to 59.second - the second from 0 to 62 (leap seconds).public TradingTime()
public TradingTime(java.lang.String time)
throws TradingTimeFormatException
| Method Detail |
public boolean before(java.lang.Object time)
time - the specified time to compare
true if the given time is before this onepublic boolean after(java.lang.Object time)
time - the specified time to compare
true if the specified time is before this one;
false otherwise.public boolean equals(java.lang.Object time)
time - the specified time to compare
true if the specified time is equal;
false otherwise.public java.lang.Object clone()
public int compareTo(java.lang.Object time)
compareTo in interface java.lang.ComparablecompareTo(TradingTime)public int compareTo(TradingTime time)
time - the time to compare
0 if the times are equal;
1 if this time is after the specified time or
-1 if this time is before the specified time.public int getHour()
public int getMinute()
public int getSecond()
public int diff(TradingTime time)
public java.lang.String toString()
|
Venice 0.74beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||