public class HecTimeArray
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
HecTimeArray() |
HecTimeArray(HecTimeArray copyFrom) |
HecTimeArray(int numberElements) |
HecTimeArray(int[] times) |
HecTimeArray(int[] times,
java.util.TimeZone timezone) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
convertTimezone(java.util.TimeZone toTimeZone,
boolean observeDST) |
HecTime |
element(int elementNumber) |
HecTime |
elementAt(int elementNumber) |
static java.util.TimeZone |
getGlobalViewTimeZone() |
int[] |
getIntArray() |
java.util.TimeZone |
getTimeZone()
Returns a SimpleTimeZone object for the time zone set
If no time zone, returns null
|
HecTime |
getTzConverted(int elementNumber)
Returns a COPY of the HecTime object at the element number given, usually used for display.
|
HecTime |
getTzUnconverted(int elementNumber) |
java.util.TimeZone |
getViewTimeZone() |
static java.lang.String |
getZoneDisplayString(java.util.TimeZone timeZone)
Reurns a time zone display string for the user, clarified for US time zones
This string should go in tables, plots, etc.
|
boolean |
hasTimeZone() |
boolean |
hasViewTimeZone() |
int |
index(HecTime time)
Search the time array to determine if the provided time is in the
time array (the time, not the address of the time).
|
int |
index(HecTime time,
boolean ascending,
int timeInterval)
Search the time array to determine if the provided time is in the
time array (the time, not the address of the time).
|
boolean |
isDefined() |
boolean |
isDefined(intContainer elementNumber) |
int |
lastDefined() |
HecTime |
maximum(intContainer elementNumber) |
HecTime |
minimum(intContainer elementNumber) |
int |
numberDefinedElements() |
int |
numberElements() |
int |
numberUndefinedElements() |
void |
removeTimeZone() |
void |
removeViewTimeZone() |
int |
resize(int numberElements)
Resize the array.
|
int |
resize(int numberElements,
int beginningElement)
Resize the array.
|
int |
resize(int numberElements,
int beginningElementOld,
int beginningElementNew)
Resize the array, while moving elements (a more complex resize)
numberElements is the new size
beginningElementOld is the position in the old array to start copying from
beginningElementNew is the position in the new array to start copying to
This function can be used to increase the size of the array (most common),
or remove data from the beginning and end of the array.
|
void |
resizeWithInterval(int startElement,
int numberToAdd,
int interval)
For arrays with regular interval times, resize and modify times to be
correct.
|
int |
set(HecTimeArray array) |
int |
set(int[] timeArray) |
int |
set(int[] timeArray,
int julianBaseDate) |
int |
set(int[] timeArray,
int timeGranularitySeconds,
int julianBaseDate) |
int |
set(int[] times,
java.util.TimeZone timezone) |
int |
set(int elementNumber,
HecTime value) |
int |
set(int elementNumber,
java.lang.String dateAndTime) |
void |
setElementAt(HecTime time,
int index) |
void |
setElementAt(java.lang.String dateAndTime,
int index) |
static void |
setGlobalViewTimeZone(java.util.TimeZone globalViewTimeZone) |
int |
setSize(int numberElements) |
void |
setTimeZone(java.util.TimeZone timeZone) |
int |
setTzConverted(int elementNumber,
HecTime value)
Sets the HecTime object at the element number given.
|
int |
setTzConverted(int elementNumber,
java.lang.String dateAndTime) |
void |
setTzUnconverted(int elementNumber,
HecTime value) |
void |
setTzUnconverted(int elementNumber,
java.lang.String dateAndTime) |
void |
setUndefined() |
void |
setViewTimeZone(java.util.TimeZone timeZone) |
void |
showTimeAsBeginningOfDay(boolean showTimeAsBeginningOfDay)
Show midnight at the
beginning of the next day, instead of the end of the previous day.
|
HecTime[] |
timeArray() |
java.lang.String |
toString() |
public HecTimeArray()
public HecTimeArray(int numberElements)
public HecTimeArray(int[] times)
public HecTimeArray(int[] times,
java.util.TimeZone timezone)
public HecTimeArray(HecTimeArray copyFrom)
public static void setGlobalViewTimeZone(java.util.TimeZone globalViewTimeZone)
public static java.util.TimeZone getGlobalViewTimeZone()
public void showTimeAsBeginningOfDay(boolean showTimeAsBeginningOfDay)
showBeginning - true to show midnight as 00:00 hrs,
false to show midnight as 24:00 hrs (default).public HecTime getTzUnconverted(int elementNumber)
public HecTime elementAt(int elementNumber)
public int set(int[] times,
java.util.TimeZone timezone)
public boolean convertTimezone(java.util.TimeZone toTimeZone,
boolean observeDST)
public HecTime getTzConverted(int elementNumber)
elementNumber - intpublic HecTime element(int elementNumber)
public void setTzUnconverted(int elementNumber,
HecTime value)
public void setTzUnconverted(int elementNumber,
java.lang.String dateAndTime)
public int setTzConverted(int elementNumber,
HecTime value)
HecTime - elementNumber - intpublic int setTzConverted(int elementNumber,
java.lang.String dateAndTime)
public int set(int elementNumber,
HecTime value)
public int set(int elementNumber,
java.lang.String dateAndTime)
public void setElementAt(HecTime time, int index)
public void setElementAt(java.lang.String dateAndTime,
int index)
public int set(HecTimeArray array)
public int set(int[] timeArray,
int timeGranularitySeconds,
int julianBaseDate)
public int set(int[] timeArray,
int julianBaseDate)
public int set(int[] timeArray)
public int[] getIntArray()
public void setUndefined()
public int numberElements()
public HecTime[] timeArray()
public int setSize(int numberElements)
public int resize(int numberElements)
public int resize(int numberElements,
int beginningElement)
public void resizeWithInterval(int startElement,
int numberToAdd,
int interval)
startElement - intnumberToAdd - intinterval - intpublic int resize(int numberElements,
int beginningElementOld,
int beginningElementNew)
public boolean isDefined()
public boolean isDefined(intContainer elementNumber)
public int index(HecTime time)
public int index(HecTime time, boolean ascending, int timeInterval)
public java.util.TimeZone getTimeZone()
public boolean hasTimeZone()
public void setTimeZone(java.util.TimeZone timeZone)
public void removeTimeZone()
public java.util.TimeZone getViewTimeZone()
public boolean hasViewTimeZone()
public void setViewTimeZone(java.util.TimeZone timeZone)
public void removeViewTimeZone()
public int lastDefined()
public HecTime maximum(intContainer elementNumber)
public HecTime minimum(intContainer elementNumber)
public int numberDefinedElements()
public int numberUndefinedElements()
public static java.lang.String getZoneDisplayString(java.util.TimeZone timeZone)
public java.lang.String toString()
toString in class java.lang.Object