Package com.xpn.xwiki.criteria.impl
Class Period
- java.lang.Object
-
- com.xpn.xwiki.criteria.impl.Period
-
public class Period extends Object
Immutable period for retrieving statistics. A period of time is uniquely identified by its bounds, and not by its span. Two periods of time with the same span are different if they don't start at the same time.
-
-
Constructor Summary
Constructors Constructor Description Period(long start, long end)
Creates a new time Period from the specified start time to the specified end time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getEnd()
int
getEndCode()
long
getStart()
int
getStartCode()
-
-
-
Constructor Detail
-
Period
public Period(long start, long end)
Creates a new time Period from the specified start time to the specified end time. Both ends of the period are given as time stamps (the number of milliseconds from 1970-01-01T00:00:00Z)- Parameters:
start
- The period start as the number of milliseconds from 1970-01-01T00:00:00Zend
- The period end as the number of milliseconds from 1970-01-01T00:00:00Z
-
-
Method Detail
-
getStart
public long getStart()
- Returns:
- The period start as the number of milliseconds from 1970-01-01T00:00:00Z
-
getEnd
public long getEnd()
- Returns:
- The period end as the number of milliseconds from 1970-01-01T00:00:00Z
-
getStartCode
public int getStartCode()
- Returns:
- The start of the period formatted with the associated formatter. Usually this is how the start of the period is stored in the database.
- See Also:
getFormatter()
-
getEndCode
public int getEndCode()
- Returns:
- The end of the period formatted with the associated formatter. Usually this is how the end of the period is stored in the database.
- See Also:
getFormatter()
-
-