Package hec.model
Class RunTimeStep
java.lang.Object
hec.model.RunTimeStep
Represents the active time step within a RunTimeWindow
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptioncreate a new RunTimeStepRunTimeStep
(RunTimeStep rts) create a new RunTimeStep initialized to rtsRunTimeStep
(RunTimeWindow runTimeWindow) create a new RunTimeStep initialized to runTimeWindow with a step of 0 and number of steps of 1 -
Method Summary
Modifier and TypeMethodDescriptionget the date and time at the current step as a StringdateTimeString
(int theStep) get the date and time at theStep.int
return the zero based integer day of week where 0000 hours belongs to the previous day.static int
getDayOfWeek
(HecTime htime) return the zero based integer day of week where 0000 hours belongs to the previous day.get the time at the current stepint
get the previous time step index.get the RunTimeWindowint
getStep()
get the current time step indexint
get the time step in minutesint
get the time step in secondsint
get the total number of steps from the RunTimeWindowint
get the julian date at the current stepint
get the minutes since midnight for the current stepvoid
increment the current step by 1void
init
(RunTimeStep rts) initialize the RunTimeStep to rtsboolean
int
month()
get the month at the current stepvoid
setStep
(int i) set the current stepint
return the time step value in minutes
-
Field Details
-
rtw
-
step
public int step -
flag
public int flag -
nstep
public int nstep
-
-
Constructor Details
-
RunTimeStep
public RunTimeStep()create a new RunTimeStep -
RunTimeStep
create a new RunTimeStep initialized to rts- Parameters:
rts
- the RunTimeStep to initialize to
-
RunTimeStep
create a new RunTimeStep initialized to runTimeWindow with a step of 0 and number of steps of 1- Parameters:
runTimeWindow
- the runTimeWindow
-
-
Method Details
-
isPerAvgTimeStep
public boolean isPerAvgTimeStep() -
init
initialize the RunTimeStep to rts- Parameters:
rts
- the RunTimeStep to initialze to
-
getTotalNumSteps
public int getTotalNumSteps()get the total number of steps from the RunTimeWindow- Returns:
- the total number of steps
-
setStep
public void setStep(int i) set the current step- Parameters:
i
- the new current step
-
getStep
public int getStep()get the current time step index- Returns:
- the current time step index
-
getPrevStep
public int getPrevStep()get the previous time step index. If current step is zero, returns 0.- Returns:
- the previous time step index
-
increment
public void increment()increment the current step by 1 -
getTimeStepSeconds
public int getTimeStepSeconds()get the time step in seconds- Returns:
- the time step in seconds, if the RunTimeWindow is null return 1
-
getTimeStepMinutes
public int getTimeStepMinutes()get the time step in minutes- Returns:
- the time step in minutes, if the RunTimeWindow is null return 1
-
dateTimeString
get the date and time at the current step as a String- Returns:
- the date and time at the current step as a String
-
dateTimeString
get the date and time at theStep.- Parameters:
theStep
- the step to get the date time at- Returns:
- the date time and step or the step if the RunTimeWindow is null
-
month
public int month()get the month at the current step- Returns:
- the month at the current step or 1 if the RunTimeWindow is null
-
hecJulian
public int hecJulian()get the julian date at the current step- Returns:
- the julian date at the current step or 1 if the RunTimeWindow is null
-
hecMinutes
public int hecMinutes()get the minutes since midnight for the current step- Returns:
- the minutes since midnight for the current step or 1 if the RunTimeWindow is null
-
getHecTime
get the time at the current step- Returns:
- the time at the current step or null if the RunTimeWindow is null
-
getDayOfWeek
public int getDayOfWeek()return the zero based integer day of week where 0000 hours belongs to the previous day. Sunday returns 0, Saturday return 6.- Returns:
- integer day of week
-
getDayOfWeek
return the zero based integer day of week where 0000 hours belongs to the previous day. Sunday returns 0, Saturday return 6.- Returns:
- integer day of week
-
valueMinutes
public int valueMinutes()return the time step value in minutes- Returns:
- integer time step value in minutes
-
getRunTimeWindow
get the RunTimeWindow- Returns:
- the RunTimeWindow
-