Package hec.data
Class Interval
java.lang.Object
hec.data.AbstractDataSet
hec.data.Interval
- All Implemented Interfaces:
Serializable
Deprecated.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.static final StringDeprecated.static final longDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.Fields inherited from class hec.data.AbstractDataSet
subFieldDelimiter -
Constructor Summary
ConstructorsModifierConstructorDescriptionInterval(int minutes) Deprecated.Construct an Interval from an int minutesprotectedDeprecated.Construct an Interval from an int minutesDeprecated.Construct an Interval from anotherIntervalDeprecated.Construct an Interval from an intervalName ("2Hours")protectedDeprecated.Construct an Interval from an intervalName ("2Hours")Interval(mil.army.usace.hec.metadata.Interval interval) Deprecated.Construct an Interval from an intervalName ("2Hours") -
Method Summary
Modifier and TypeMethodDescriptionstatic longcalcNumberOfIntervals(Date startTime, Date endTime, Interval interval, IntervalOffset intervalOffset, TimeZone timeZone) Deprecated.Returns the number of intervals contained between the start and end times for the offsetted interval.booleanDeprecated.static String[]Deprecated.intDeprecated.Returns the corresponding amount value to be used with the calendar field from this intervalintDeprecated.Returns the appropriate Calendar field for this interval.Deprecated.mil.army.usace.hec.metadata.IntervalDeprecated.longDeprecated.intDeprecated.static longgetNextIntervalTime(long time, Interval interval, TimeZone timeZone) Deprecated.Takes the arg time, adds one interval, and returns the value.static longgetPreviousIntervalTime(long time, Interval interval, TimeZone timeZone) Deprecated.Takes the arg time, subtracts one interval, and returns the time.intDeprecated.static longgetTimeAtNextInterval(long time, String intervalName, TimeZone timeZone) Deprecated.This method is inefficient as it has to construct the interval.static longgetTimeAtTopOfIntervalOnOrAfter(long time, String intervalName, TimeZone timeZone) Deprecated.This method is inefficient as it has to construct the interval.static longgetTimeAtTopOfIntervalOnOrBefore(long time, String intervalName, TimeZone timeZone) Deprecated.This method is inefficient as it has to construct the interval.static longgetTimeOnNextInterval(long time, Interval interval, IntervalOffset intervalOffset, TimeZone timeZone) Deprecated.Determines the next interval time using the arg time.static longgetTimeOnPreviousInterval(long time, Interval interval, IntervalOffset intervalOffset, TimeZone timeZone) Deprecated.Determines the previous interval time using the arg time.inthashCode()Deprecated.booleanisDaily()Deprecated.booleanisHourly()Deprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.Returntruemeans MUST cross a Day, Month, and Year EXACTLYstatic booleanisRegular(int intervalMinutes) Deprecated.Returns a boolean indicating if the argument intervalMinutes is a valid regular time series.booleanisWeekly()Deprecated.booleanisYearly()Deprecated.static intparseForInterval(String intervalName) Deprecated.protected voidparseIntervalName(String intervalName) Deprecated.voidsetInterval(int minutes) Deprecated.voidsetInterval(String intervalName) Deprecated.toString()Deprecated.Methods inherited from class hec.data.AbstractDataSet
sdfFULL
-
Field Details
-
LocalRegularTimeIntervalPrefix
Deprecated.- See Also:
-
SECONDS_IN_DAY
public static final int SECONDS_IN_DAYDeprecated.- See Also:
-
MILLIS_IN_DAY
public static final long MILLIS_IN_DAYDeprecated.- See Also:
-
YEAR_SECONDS
public static final int YEAR_SECONDSDeprecated.- See Also:
-
MONTH_SECONDS
public static final int MONTH_SECONDSDeprecated.- See Also:
-
WEEK_SECONDS
public static final int WEEK_SECONDSDeprecated.- See Also:
-
DAY_SECONDS
public static final int DAY_SECONDSDeprecated.- See Also:
-
HOUR_SECONDS
public static final int HOUR_SECONDSDeprecated.- See Also:
-
MINUTE_SECONDS
public static final int MINUTE_SECONDSDeprecated.- See Also:
-
-
Constructor Details
-
Interval
Deprecated.Construct an Interval from an intervalName ("2Hours")- Throws:
DataSetIllegalArgumentException
-
Interval
public Interval(mil.army.usace.hec.metadata.Interval interval) Deprecated.Construct an Interval from an intervalName ("2Hours") -
Interval
Deprecated.Construct an Interval from an int minutes- Throws:
DataSetIllegalArgumentException
-
Interval
Deprecated.Construct an Interval from an intervalName ("2Hours")- Throws:
DataSetIllegalArgumentException
-
Interval
Deprecated.Construct an Interval from an int minutes- Throws:
DataSetIllegalArgumentException
-
Interval
Deprecated.Construct an Interval from anotherInterval
-
-
Method Details
-
hashCode
public int hashCode()Deprecated. -
equals
Deprecated. -
toString
Deprecated. -
getInterval
Deprecated. -
setInterval
Deprecated.- Throws:
DataSetIllegalArgumentException
-
setInterval
Deprecated.- Throws:
DataSetIllegalArgumentException
-
getAvailableIntervals
Deprecated. -
getSeconds
public int getSeconds()Deprecated. -
getTimeAtTopOfIntervalOnOrBefore
@Deprecated public static long getTimeAtTopOfIntervalOnOrBefore(long time, String intervalName, TimeZone timeZone) throws DataSetIllegalArgumentException Deprecated.This method is inefficient as it has to construct the interval. Use getTimeOnPreviousInterval(long, Interval, IntervalOffset, TimeZone) instead.- Parameters:
time-intervalName-timeZone-- Returns:
- Throws:
DataSetIllegalArgumentException
-
getTimeOnPreviousInterval
public static long getTimeOnPreviousInterval(long time, Interval interval, IntervalOffset intervalOffset, TimeZone timeZone) throws DataSetIllegalArgumentException Deprecated.Determines the previous interval time using the arg time. The previous interval time will be at the top of the interval if the offset arg is null. If the offset arg is not null, then the next interval time will be at the top of the interval + the offset.- Parameters:
time-interval-intervalOffset-timeZone-- Returns:
- Throws:
DataSetIllegalArgumentException
-
getTimeAtTopOfIntervalOnOrAfter
@Deprecated public static long getTimeAtTopOfIntervalOnOrAfter(long time, String intervalName, TimeZone timeZone) throws DataSetIllegalArgumentException Deprecated.This method is inefficient as it has to construct the interval. Use getTimeOnNextInterval(long, Interval, IntervalOffset, TimeZone) instead.- Parameters:
time-intervalName-timeZone-- Returns:
- Throws:
DataSetIllegalArgumentException
-
getTimeOnNextInterval
public static long getTimeOnNextInterval(long time, Interval interval, IntervalOffset intervalOffset, TimeZone timeZone) throws DataSetIllegalArgumentException Deprecated.Determines the next interval time using the arg time. The next interval time will be at the top of the interval if the offset arg is null. If the offset arg is not null, then the next interval time will be at the top of the interval + the offset.- Parameters:
time-interval-intervalOffset-timeZone-- Returns:
- Throws:
DataSetIllegalArgumentException
-
isLessThanDecade
public boolean isLessThanDecade()Deprecated. -
isLessThanYearly
public boolean isLessThanYearly()Deprecated. -
isLessThanMonthly
public boolean isLessThanMonthly()Deprecated. -
isLessThanWeekly
public boolean isLessThanWeekly()Deprecated. -
isLessThanDaily
public boolean isLessThanDaily()Deprecated. -
isLessThanHourly
public boolean isLessThanHourly()Deprecated. -
getTimeAtNextInterval
@Deprecated public static long getTimeAtNextInterval(long time, String intervalName, TimeZone timeZone) throws DataSetIllegalArgumentException Deprecated.This method is inefficient as it has to construct the interval. Use the getNextIntervalTime(long, Interval, TimeZone) method instead.- Parameters:
time-intervalName-timeZone-- Returns:
- Throws:
DataSetIllegalArgumentException
-
getNextIntervalTime
public static long getNextIntervalTime(long time, Interval interval, TimeZone timeZone) throws DataSetIllegalArgumentException Deprecated.Takes the arg time, adds one interval, and returns the value. Does not account for top of interval or time offsets.- Parameters:
time-interval-timeZone-- Returns:
- Throws:
DataSetIllegalArgumentException
-
getPreviousIntervalTime
public static long getPreviousIntervalTime(long time, Interval interval, TimeZone timeZone) throws DataSetIllegalArgumentException Deprecated.Takes the arg time, subtracts one interval, and returns the time. Does not account for top of interval or time offsets.- Parameters:
time-interval-timeZone-- Returns:
- Throws:
DataSetIllegalArgumentException
-
calcNumberOfIntervals
public static long calcNumberOfIntervals(Date startTime, Date endTime, Interval interval, IntervalOffset intervalOffset, TimeZone timeZone) throws DataSetIllegalArgumentException Deprecated.Returns the number of intervals contained between the start and end times for the offsetted interval.- Parameters:
startTime- top of interval is on or after this timeendTime- top of interval is on or before this timeinterval- the intervalintervalOffset- the offset for the intervaltimeZone- the time zone for calendar math- Returns:
- Throws:
DataSetIllegalArgumentException
-
getMillis
public long getMillis()Deprecated. -
getMinutes
public int getMinutes()Deprecated. -
isRegular
public boolean isRegular()Deprecated.Returntruemeans MUST cross a Day, Month, and Year EXACTLY -
isNotRegular
public boolean isNotRegular()Deprecated. -
isHourly
public boolean isHourly()Deprecated. -
isDaily
public boolean isDaily()Deprecated. -
isWeekly
public boolean isWeekly()Deprecated. -
isMonthly
public boolean isMonthly()Deprecated. -
isYearly
public boolean isYearly()Deprecated. -
parseForInterval
Deprecated.- Throws:
DataSetIllegalArgumentException
-
parseIntervalName
Deprecated.- Throws:
DataSetIllegalArgumentException
-
isRegular
public static boolean isRegular(int intervalMinutes) Deprecated.Returns a boolean indicating if the argument intervalMinutes is a valid regular time series. -
getCalendarField
public int getCalendarField()Deprecated.Returns the appropriate Calendar field for this interval.- Returns:
-
getCalendarAmount
public int getCalendarAmount()Deprecated.Returns the corresponding amount value to be used with the calendar field from this interval- Returns:
-
getMetaDataInterval
public mil.army.usace.hec.metadata.Interval getMetaDataInterval()Deprecated.
-
Intervalor one of the implementations of mil.army.usace.hec.metadata.Interval in hec-nucleus-metadata.