|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.util.IstiEpoch
IstiEpoch is a class that is used to help convert from IstiEpochs (either longs or doubles) into GregorianCalendar
Field Summary | |
static int |
AllTime
|
static int |
Day
|
static int |
DayHr
|
static int |
DayHrMin
|
static int |
DayHrMinSec
|
static int |
DayHrMinSecMsec
|
static java.lang.String |
defaultBottomFormat
|
static java.lang.String |
defaultFormat
|
static int |
Epoch
|
static java.lang.String |
epochFormat
|
static int |
HrMin
|
static int |
HrMinSec
|
static int |
HrMinSecMSec
|
static int |
Min
|
static int |
MinSec
|
static int |
MinSecMsec
|
(package private) java.lang.String[] |
monthNames
|
static int |
Msec
|
static int |
None
|
static int |
SecMsec
|
static int |
YearDay
|
static int |
YearDayHr
|
static int |
YearDayHrMin
|
static int |
YearDayHrMinSec
|
Constructor Summary | |
IstiEpoch()
This constructor sets the time to 0 milliseconds. |
|
IstiEpoch(java.util.Date gc)
creates an IstiEpoch from an existing GregorianCaledar, and sets the TimeZone correctly to UTC |
|
IstiEpoch(double tmpDoub)
This constructor takes the number of seconds from the Epoch time |
|
IstiEpoch(java.util.GregorianCalendar gc)
creates an IstiEpoch from an existing GregorianCaledar, and sets the TimeZone correctly to UTC |
|
IstiEpoch(IstiEpoch tmpIstiEpoch)
This constructor takes the Epoch time |
|
IstiEpoch(long tmpTime)
This constructor takes the number of milliseconds from the Epoch time |
|
IstiEpoch(long seconds,
long milliseconds)
This constructor takes the number of seconds and milliseconds from the Epoch time |
|
IstiEpoch(java.lang.String respTime)
This constructor takes time from a string in RESP outptu format YYYY,DDD,HH:MM:SS from the Epoch time |
Method Summary | |
double |
absDiff(IstiEpoch newEpoch)
This function returns the number of seconds between this and another IstiEpoch |
void |
add(double secs)
This function adds the number of seconds to the time |
java.lang.String |
btimeFormattedString()
|
void |
clear()
|
int |
compare(IstiEpoch time1,
IstiEpoch time2)
Compares its two arguments for order. |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares its two arguments for order. |
int |
compareTo(IstiEpoch anotherTime)
Compares this IstiEpoch to another Object. |
int |
compareTo(java.lang.Object o)
Compares this IstiEpoch to another Object. |
double |
diff(IstiEpoch newEpoch)
This function returns the number of seconds between this and another IstiEpoch |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
fileFormattedString()
Method declaration |
java.lang.String |
formatInt(java.lang.String item,
int places)
forward pads in with zero's |
java.lang.String |
formattedString()
Method declaration |
java.lang.String |
formattedString(int type)
|
java.lang.String |
formattedString(java.lang.String name)
|
int |
get(int calVal)
|
double |
getEpoch()
GetEpoch returns the number of seconds for the epoch time |
static java.lang.String[] |
getFormattedStrings()
|
static java.lang.String |
getFormatType(int type)
|
java.util.GregorianCalendar |
getGregorianCalendar()
Method declaration |
java.lang.String |
getHr()
Method declaration |
int |
getIntDOM()
|
int |
getIntDOY()
|
int |
getIntEpoch()
|
long |
getIntEpochMSecs()
GetEpoch returns the number of milli-seconds for the epoch time |
int |
getIntHr()
get the int value for hour into the day. |
int |
getIntInt(int calendarStatic)
|
int |
getIntMn()
get the int value for minutes into the day. |
int |
getIntMonth()
Method declaration |
int |
getIntSec()
get the int value for seconds into the day. |
int |
getIntYear()
Method declaration |
java.lang.String |
getJDay()
Method declaration |
long |
getLongEpoch()
GetLongEpoch returns the number of seconds for the epoch time |
int |
getmDay()
Method declaration |
java.lang.String |
getMDay()
Method declaration |
java.lang.String |
getMn()
Method declaration |
java.lang.String |
getMonStr()
Method declaration |
java.lang.String |
getMSecond()
Method declaration |
java.lang.String |
getMsecond(int places)
|
java.lang.String |
getSecond()
Method declaration |
java.lang.String |
getTenthsMillisecond()
|
java.util.Date |
getTime()
|
long |
getTimeInMillis()
Gets the current time as a long. |
java.util.TimeZone |
getTimeZone()
|
java.lang.String |
getYear()
Method declaration |
int |
hashCode()
Returns a hash code value for this object. |
java.lang.String |
hrminsecmsString()
Method declaration |
java.lang.String |
hrminsecString()
Method declaration |
boolean |
inTimeRange(IstiEpoch start,
IstiEpoch end)
returns true is this IstiEpoch lies between the 2 argument times. |
boolean |
isAfter(double rtime)
returns true is this IstiEpoch if after given time |
boolean |
isAfter(IstiEpoch refTime)
returns true is this IstiEpoch if after given time |
boolean |
isAfterEqual(IstiEpoch refTime)
returns true is this IstiEpoch if after given time |
boolean |
isAfterNotEqual(IstiEpoch refTime)
returns true is this IstiEpoch if after given time |
boolean |
isBefore(double rtime)
returns true is this IstiEpoch if before given time |
boolean |
isBefore(IstiEpoch refTime)
returns true is this IstiEpoch if before given time |
boolean |
isBeforeEqual(IstiEpoch refTime)
returns true is this IstiEpoch if before given time |
boolean |
isBeforeNotEqual(IstiEpoch refTime)
returns true is this IstiEpoch if before given time |
boolean |
isEqualTo(IstiEpoch refTime)
returns true is this IstiEpoch is equal to a given time |
boolean |
isEvenMinute()
Method declaration |
java.lang.String |
ISO8601FormattedString()
|
java.lang.String |
labelformattedString()
Method declaration |
java.lang.String |
longformattedString()
Method declaration |
static void |
main(java.lang.String[] args)
|
java.lang.String |
minsecString()
Method declaration |
void |
minus(double secs)
This function subtracts the number of seconds from the time |
java.lang.String |
secString()
Method declaration |
void |
set(int year,
int month,
int day,
int hr,
int min)
enter everything but the seconds |
void |
setDateToTODAY()
trims the time to the start of the current day (leave time alone) |
void |
setHr(int hour)
Method declaration |
void |
setIntTime(double dsecs)
set time passing in secs since 1970 |
void |
setIntTime(int secs)
set time passing in secs since 1970 |
void |
setJDay(int doy)
Method declaration |
void |
setmDay(int day)
Method declaration |
void |
setMn(int min)
Method declaration |
void |
setMonth(int month)
Method declaration |
void |
setMSecond(int milli)
Method declaration |
void |
setSec(int sec)
Method declaration |
void |
setSecond(int sec)
Method declaration |
void |
setTime(java.util.Date date)
|
void |
setTime(double dsecs)
set time passing in millisecs since 1970 |
void |
setTime(int millisecs)
set time passing in millisecs since 1970 |
void |
setTime(int year,
int jday,
int hr,
int min,
int sec)
Method declaration |
void |
setTime(IstiEpoch newTime)
Method declaration |
void |
setTime(long msecs)
set time passing in millisecs since 1970. |
void |
setTime(long seconds,
long milliseconds)
set time passing in seconds and millisecs since 1970 |
void |
setTime(java.lang.String respTime)
set time from RESP format string time. |
void |
setTimeFissuresTime(java.lang.String ftime)
accepts the time in the format YYYY-MM-DDTHH:MM:SS.mmmZ |
void |
setTimeInMillis(long millis)
Sets the current time from the given long value. |
void |
setTimetoDay()
trims the time to the start of the current day |
void |
setTimetoDay(IstiEpoch tmpTime)
trims the time to the start of the desired day |
IstiEpoch |
settoCurrentTime()
Method declaration used to return a void |
void |
setYear(int year)
Method declaration |
java.lang.String |
toString()
Method declaration |
static java.lang.String |
toString(double tmpdouble)
|
java.lang.String |
toWaveviewerRequestString()
Method declaration |
java.lang.String |
yeardayString()
Method declaration |
java.lang.String |
yearmondayhrminString()
Method declaration |
java.lang.String |
yearmondayString()
Method declaration |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String epochFormat
public static final java.lang.String defaultFormat
public static final java.lang.String defaultBottomFormat
public static final int None
public static final int AllTime
public static final int YearDayHrMinSec
public static final int YearDayHrMin
public static final int YearDayHr
public static final int YearDay
public static final int DayHrMinSecMsec
public static final int DayHrMinSec
public static final int DayHrMin
public static final int DayHr
public static final int Day
public static final int HrMinSecMSec
public static final int HrMinSec
public static final int HrMin
public static final int MinSecMsec
public static final int MinSec
public static final int Min
public static final int SecMsec
public static final int Msec
public static final int Epoch
java.lang.String[] monthNames
Constructor Detail |
public IstiEpoch()
public IstiEpoch(double tmpDoub)
public IstiEpoch(IstiEpoch tmpIstiEpoch)
public IstiEpoch(java.util.GregorianCalendar gc)
gc
- public IstiEpoch(java.util.Date gc)
gc
- public IstiEpoch(long tmpTime)
public IstiEpoch(long seconds, long milliseconds)
public IstiEpoch(java.lang.String respTime)
Method Detail |
public java.util.GregorianCalendar getGregorianCalendar()
public IstiEpoch settoCurrentTime()
public void setTimetoDay()
public void setDateToTODAY()
public void setTimetoDay(IstiEpoch tmpTime)
public static java.lang.String getFormatType(int type)
public final void setTime(java.util.Date date)
public final void setTime(long msecs)
msecs
- millisecs since 1970.public void setTimeFissuresTime(java.lang.String ftime)
ftime
- Stringpublic final void setTime(java.lang.String respTime)
public final void setTime(double dsecs)
public void setIntTime(double dsecs)
public void setIntTime(int secs)
secs
- public void setTime(int millisecs)
public final void setTimeInMillis(long millis)
millis
- the new time in UTC milliseconds from the epoch,
January 1, 1970, 00:00:00.public final void setTime(long seconds, long milliseconds)
seconds
- seconds since 1970.milliseconds
- millisecs since 1970.public void setTime(IstiEpoch newTime)
newTime
-
public void add(double secs)
public void minus(double secs)
public double diff(IstiEpoch newEpoch)
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- Object
java.lang.ClassCastException
- - if the argument is not an IstiEpoch.public int compareTo(IstiEpoch anotherTime)
anotherTime
- the time to be compared.
public int hashCode()
public int compare(java.lang.Object o1, java.lang.Object o2) throws java.lang.ClassCastException
compare
in interface java.util.Comparator
o1
- the first Object.o2
- the second Object.
java.lang.ClassCastException
- - if an argument is not an IstiEpoch.public int compare(IstiEpoch time1, IstiEpoch time2)
time1
- the first time.time2
- the second time.
public double absDiff(IstiEpoch newEpoch)
public boolean inTimeRange(IstiEpoch start, IstiEpoch end)
public boolean isBefore(IstiEpoch refTime)
public boolean isBefore(double rtime)
public boolean isBeforeEqual(IstiEpoch refTime)
public boolean isAfter(IstiEpoch refTime)
public boolean isAfter(double rtime)
public boolean isEqualTo(IstiEpoch refTime)
public boolean isBeforeNotEqual(IstiEpoch refTime)
public boolean isAfterNotEqual(IstiEpoch refTime)
public boolean isAfterEqual(IstiEpoch refTime)
public double getEpoch()
public long getLongEpoch()
public int getIntEpoch()
public long getIntEpochMSecs()
public long getTimeInMillis()
public java.lang.String toString()
public static java.lang.String toString(double tmpdouble)
public java.lang.String toWaveviewerRequestString()
public java.lang.String hrminsecString()
public java.lang.String hrminsecmsString()
public java.lang.String minsecString()
public java.lang.String secString()
public java.lang.String yeardayString()
public java.lang.String yearmondayString()
public java.lang.String yearmondayhrminString()
public java.lang.String formattedString(java.lang.String name)
public static java.lang.String[] getFormattedStrings()
public java.lang.String formattedString(int type)
public java.lang.String formattedString()
public java.lang.String ISO8601FormattedString()
public java.lang.String btimeFormattedString()
public java.lang.String longformattedString()
public java.lang.String labelformattedString()
public java.lang.String fileFormattedString()
public void setTime(int year, int jday, int hr, int min, int sec)
year
- jday
- hr
- min
- sec
-
public int getIntYear()
public int get(int calVal)
public java.util.Date getTime()
public int getIntMonth()
public int getIntDOY()
public int getIntDOM()
public int getIntInt(int calendarStatic)
public int getmDay()
public void setYear(int year)
year
-
public void setMonth(int month)
month
-
public void setmDay(int day)
day
-
public void setJDay(int doy)
doy
-
public void setHr(int hour)
hour
-
public void setMn(int min)
min
-
public void setSec(int sec)
sec
-
public void setSecond(int sec)
sec
-
public void set(int year, int month, int day, int hr, int min)
public void setMSecond(int milli)
milli
-
public java.lang.String getYear()
public java.lang.String getMonStr()
public java.lang.String getMDay()
public java.lang.String getJDay()
public java.lang.String getHr()
public java.lang.String getMn()
public int getIntMn()
public int getIntSec()
public int getIntHr()
public java.lang.String getSecond()
public java.lang.String getMsecond(int places)
public java.lang.String getTenthsMillisecond()
public java.lang.String getMSecond()
public boolean isEvenMinute()
public java.lang.String formatInt(java.lang.String item, int places)
public java.util.TimeZone getTimeZone()
public void clear()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |