public class HourPartitionSize extends Object implements PartitionSize
DAY_IN_MONTH, DAY_IN_WEEK, DAY_IN_YEAR, DAY_NAME, HOUR_IN_DAY, HOUR_NAME, MONTH_NAME, MS_IN_DAY, MS_IN_HOUR, MS_IN_MONTH, MS_IN_SEC, MS_IN_TWO_MONTH, MS_IN_TWO_YEAR, MS_IN_WEEK, MS_IN_YEAR, SEC_IN_HOUR, TWO_MONTH_NAME, TWO_YEAR_NAME, WEEK_NAME, YEAR_NAME
Constructor and Description |
---|
HourPartitionSize() |
Modifier and Type | Method and Description |
---|---|
void |
alignStart(Calendar in)
Align the calendar argument to the start of the interval covered by
this size.
|
Calendar |
increment(Calendar start,
int offset)
Create a new Calendar object, aligned relative to the Calendar argument,
either forward or backward some number of partitions.
|
long |
intervalMS() |
String |
name() |
public String name()
name
in interface PartitionSize
public long intervalMS()
intervalMS
in interface PartitionSize
public void alignStart(Calendar in)
PartitionSize
alignStart
in interface PartitionSize
in
- Calendar object which has internal Date setpublic Calendar increment(Calendar start, int offset)
PartitionSize
increment
in interface PartitionSize
start
- the returned Calendar will be aligned one day, week, month,
etc. ahead or behind of this Calendar argument.offset
- the relative distance to move the returned calendar
relative to the argument Calendar.Copyright © 2005–2015 IIPC. All rights reserved.