public static class IlvTimeIncrementPolicy.Hour extends Object implements IlvTimeIncrementPolicy
IlvTimeIncrementPolicy.Hour
implements a strategy for stepping through
discrete hour increments.IlvTimeIncrementPolicy.Day, IlvTimeIncrementPolicy.HalfDay, IlvTimeIncrementPolicy.Hour, IlvTimeIncrementPolicy.Minute, IlvTimeIncrementPolicy.Month, IlvTimeIncrementPolicy.Second, IlvTimeIncrementPolicy.Week, IlvTimeIncrementPolicy.Year
Constructor and Description |
---|
Hour()
Creates a new
IlvTimeIncrementPolicy.Hour policy. |
Modifier and Type | Method and Description |
---|---|
void |
decrementTime(Calendar calendar)
Decrements the given
Calendar downwards by
hourStep hours. |
void |
floorTime(Calendar calendar)
Truncates the given
Calendar downwards to the nearest
hourStep hour boundary. |
int |
getHourStep()
Returns the number of hours in a step increment.
|
void |
incrementTime(Calendar calendar)
Increments the given
Calendar upwards by
hourStep hours. |
void |
setHourStep(int hourStep)
Sets the number of hours in a step increment.
|
public int getHourStep()
1
.setHourStep(int)
public void setHourStep(int hourStep)
hourStep
- The number of hours in a step increment.getHourStep()
public void floorTime(Calendar calendar)
Calendar
downwards to the nearest
hourStep hour boundary.floorTime
in interface IlvTimeIncrementPolicy
calendar
- The calendar to floor.public void incrementTime(Calendar calendar)
Calendar
upwards by
hourStep hours.incrementTime
in interface IlvTimeIncrementPolicy
calendar
- The calendar to increment.public void decrementTime(Calendar calendar)
Calendar
downwards by
hourStep hours.decrementTime
in interface IlvTimeIncrementPolicy
calendar
- The calendar to decrement.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.