public class TimestampRoundDownUtil extends Object
Constructor and Description |
---|
TimestampRoundDownUtil() |
Modifier and Type | Method and Description |
---|---|
static long |
roundDownTimeStampHours(long timestamp,
int roundDownHours) |
static long |
roundDownTimeStampMinutes(long timestamp,
int roundDownMins) |
static long |
roundDownTimeStampSeconds(long timestamp,
int roundDownSec) |
public static long roundDownTimeStampSeconds(long timestamp, int roundDownSec) throws IllegalStateException
timestamp
- - The time stamp to be rounded down.roundDownSec
- - The timestamp is rounded down to the largest
multiple of roundDownSec seconds
less than or equal to timestamp. Should be between 0 and 60.IllegalStateException
public static long roundDownTimeStampMinutes(long timestamp, int roundDownMins) throws IllegalStateException
timestamp
- - The time stamp to be rounded down.roundDownMins
- - The timestamp is rounded down to the
largest multiple of roundDownMins minutes less than
or equal to timestamp. Should be between 0 and 60.IllegalStateException
public static long roundDownTimeStampHours(long timestamp, int roundDownHours) throws IllegalStateException
timestamp
- - The time stamp to be rounded down.roundDownHours
- - The timestamp is rounded down to the
largest multiple of roundDownHours hours less than
or equal to timestamp. Should be between 0 and 24.IllegalStateException
Copyright © 2009-2014 Apache Software Foundation. All Rights Reserved.