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