public static class IlvTimeIncrementPolicy2.Hour extends IlvTimeIncrementPolicy.Hour implements IlvTimeIncrementPolicy2
IlvTimeIncrementPolicy.Hour
implements a strategy for stepping through
discrete hour increments.IlvTimeIncrementPolicy2.Day, IlvTimeIncrementPolicy2.HalfDay, IlvTimeIncrementPolicy2.Hour, IlvTimeIncrementPolicy2.Minute, IlvTimeIncrementPolicy2.Month, IlvTimeIncrementPolicy2.Second, IlvTimeIncrementPolicy2.Week, IlvTimeIncrementPolicy2.Year
Constructor and Description |
---|
Hour()
Creates a new
IlvTimeIncrementPolicy.Hour policy. |
Modifier and Type | Method and Description |
---|---|
void |
decrementTime(com.ibm.icu.util.Calendar calendar)
Decrements the given
Calendar downwards by
hourStep hours. |
void |
floorTime(com.ibm.icu.util.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(com.ibm.icu.util.Calendar calendar)
Increments the given
Calendar upwards by
hourStep hours. |
void |
setHourStep(int hourStep)
Sets the number of hours in a step increment.
|
decrementTime, floorTime, incrementTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decrementTime, floorTime, incrementTime
public int getHourStep()
1
.getHourStep
in class IlvTimeIncrementPolicy.Hour
setHourStep(int)
public void setHourStep(int hourStep)
setHourStep
in class IlvTimeIncrementPolicy.Hour
hourStep
- The number of hours in a step increment.getHourStep()
public void floorTime(com.ibm.icu.util.Calendar calendar)
Calendar
downwards to the nearest
hourStep hour boundary.floorTime
in interface IlvTimeIncrementPolicy2
calendar
- The calendar to floor.public void incrementTime(com.ibm.icu.util.Calendar calendar)
Calendar
upwards by
hourStep hours.incrementTime
in interface IlvTimeIncrementPolicy2
calendar
- The calendar to increment.public void decrementTime(com.ibm.icu.util.Calendar calendar)
Calendar
downwards by
hourStep hours.decrementTime
in interface IlvTimeIncrementPolicy2
calendar
- The calendar to decrement.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.