org.activemath.webapp.report.bucket
Class BucketType
java.lang.Object
org.activemath.webapp.report.bucket.BucketType
public final class BucketType
- extends Object
Buckettype (typesafe enum pattern)
VALUES
public static final List<BucketType> VALUES
DISCRETE
public static final BucketType DISCRETE
MINUTES
public static final BucketType MINUTES
HOURS
public static final BucketType HOURS
DAYS
public static final BucketType DAYS
WEEKS
public static final BucketType WEEKS
MONTHS
public static final BucketType MONTHS
getByName
public static final BucketType getByName(String name)
- Returns:
BucketType instance for type name, or null.
getType
public String getType()
getMarginTs
public static long getMarginTs(BucketType type,
long refTs)
- Find the beginning of the next time unit (minute, hour, day, week, month) to be used
as a query constraint.
This involves some calendar work.
- Returns:
- timestamp indicating the beginning of next time unit.
getWidth
public long getWidth()
toString
public String toString()
- Overrides:
toString in class Object