|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iris.Fissures.seed.container.SeedObject
edu.iris.Fissures.seed.container.Btime
public class Btime
Structure for storing SEED time elements. Acts as a container for the BTIME structure. Capable of String and Binary operations.
Nested Class Summary | |
---|---|
static class |
Btime.MonthDayYear
Month, day and year. |
Constructor Summary | |
---|---|
Btime()
Construct object initialized to the current GMT time. |
|
Btime(byte[] timeArr)
Accept input BTIME array with automatic byte swap checking. |
|
Btime(byte[] timeArr,
boolean byteSwapFlag)
Accept input BTIME array and indicated byte swap flag. |
|
Btime(java.lang.String timeString)
Create object using string value. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compare our value to the provided object, which needs to be a Btime object. |
long |
diffSeconds(Btime minusTime)
Return time difference in seconds. |
boolean |
equals(Btime compareTime)
Compare our object's time with the offered compareTime. |
byte[] |
getByteTime()
|
byte[] |
getByteTime(boolean swapFlag)
Return byte array consisting of SEED BTIME representation of time. |
int |
getDayOfYear()
|
long |
getEpochTime()
Return the number of seconds since January 1, 1970. |
java.lang.String |
getError()
Return error messages regarding the reading of a time string as input. |
int |
getHour()
|
static java.lang.String |
getJulianDay(int year,
int month,
int day)
Convert year, month, and day values to a year/julian day representation. |
int |
getLookupId()
Return SeedObject lookup ID. |
int |
getMinute()
|
static java.lang.String |
getMonthDay(int year,
int jday)
Convert a year and julian day value to a year/month/day representation. |
Btime.MonthDayYear |
getMonthDayYear()
Returns the month, day and year. |
static Btime.MonthDayYear |
getMonthDayYear(int year,
int jday)
Returns the month, day and year. |
int |
getSecond()
|
java.lang.String |
getStringTime()
Get string representation of time. |
boolean |
getSwapFlag()
Return the binary word swap flag. |
int |
getTenthMill()
|
int |
getType()
Return SeedObject type number. |
int |
getYear()
private int year = 2500; private int jday = 1; private int hour = 0; private int min = 0; private int sec = 0; private int tenthMilli = 0; |
Btime |
projectTime(double tenThousandths)
Return a new time value that is a projection from this object's current time. |
void |
setDayOfYear(int i)
|
void |
setHour(int i)
|
void |
setMinute(int i)
|
void |
setSecond(int i)
|
void |
setTenthMill(int i)
|
void |
setYear(int i)
|
java.lang.String |
toString()
Get string representation of time. |
protected double |
ttConvert()
Get ten-thousandths representation of time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Btime() throws SeedInputException
SeedInputException
public Btime(byte[] timeArr, boolean byteSwapFlag) throws SeedInputException
SeedInputException
public Btime(byte[] timeArr) throws SeedInputException
SeedInputException
public Btime(java.lang.String timeString) throws SeedInputException
SeedInputException
Method Detail |
---|
public int getType()
getType
in class SeedObject
public int getLookupId()
getLookupId
in class SeedObject
public byte[] getByteTime(boolean swapFlag)
public byte[] getByteTime()
public java.lang.String getStringTime()
public java.lang.String toString()
toString
in class SeedObject
public long getEpochTime()
public boolean equals(Btime compareTime)
public long diffSeconds(Btime minusTime)
public boolean getSwapFlag()
public java.lang.String getError()
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
compareTo
in class SeedObject
java.lang.ClassCastException
public Btime projectTime(double tenThousandths) throws SeedInputException
SeedInputException
public Btime.MonthDayYear getMonthDayYear()
public static Btime.MonthDayYear getMonthDayYear(int year, int jday)
year
- the year.jday
- the julian day.
public static java.lang.String getMonthDay(int year, int jday)
year
- the year.jday
- the julian day.
public static java.lang.String getJulianDay(int year, int month, int day)
public int getYear()
public int getDayOfYear()
public int getHour()
public int getMinute()
public int getSecond()
public int getTenthMill()
public void setYear(int i)
public void setDayOfYear(int i)
public void setHour(int i)
public void setMinute(int i)
public void setSecond(int i)
public void setTenthMill(int i)
protected double ttConvert()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |