public class PeriodGranularity extends Granularity implements com.fasterxml.jackson.databind.JsonSerializable
Granularity.Formatter
Constructor and Description |
---|
PeriodGranularity(org.joda.time.Period period,
org.joda.time.DateTime origin,
org.joda.time.DateTimeZone tz) |
Modifier and Type | Method and Description |
---|---|
org.joda.time.DateTime |
bucketStart(org.joda.time.DateTime time) |
org.joda.time.DateTime |
decrement(org.joda.time.DateTime time) |
boolean |
equals(Object o) |
byte[] |
getCacheKey()
Get a byte array used as a cache key.
|
org.joda.time.format.DateTimeFormatter |
getFormatter(Granularity.Formatter type) |
org.joda.time.DateTime |
getOrigin() |
org.joda.time.Period |
getPeriod() |
org.joda.time.DateTimeZone |
getTimeZone() |
int |
hashCode() |
org.joda.time.DateTime |
increment(org.joda.time.DateTime time) |
void |
serialize(com.fasterxml.jackson.core.JsonGenerator jsonGenerator,
com.fasterxml.jackson.databind.SerializerProvider serializerProvider) |
void |
serializeWithType(com.fasterxml.jackson.core.JsonGenerator jsonGenerator,
com.fasterxml.jackson.databind.SerializerProvider serializerProvider,
com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSerializer) |
org.joda.time.DateTime |
toDate(String filePath,
Granularity.Formatter formatter) |
org.joda.time.DateTime |
toDateTime(long offset) |
String |
toString() |
bucket, bucketEnd, fromString, getIterable, granularitiesFinerThan, mergeGranularities, toDate, toPath
public PeriodGranularity(org.joda.time.Period period, org.joda.time.DateTime origin, org.joda.time.DateTimeZone tz)
public org.joda.time.Period getPeriod()
public org.joda.time.DateTimeZone getTimeZone()
public org.joda.time.DateTime getOrigin()
public org.joda.time.format.DateTimeFormatter getFormatter(Granularity.Formatter type)
getFormatter
in class Granularity
public org.joda.time.DateTime increment(org.joda.time.DateTime time)
increment
in class Granularity
public org.joda.time.DateTime decrement(org.joda.time.DateTime time)
decrement
in class Granularity
public org.joda.time.DateTime bucketStart(org.joda.time.DateTime time)
bucketStart
in class Granularity
public org.joda.time.DateTime toDate(String filePath, Granularity.Formatter formatter)
toDate
in class Granularity
public byte[] getCacheKey()
Cacheable
getCacheKey
in interface Cacheable
public org.joda.time.DateTime toDateTime(long offset)
toDateTime
in class Granularity
public void serialize(com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
serialize
in interface com.fasterxml.jackson.databind.JsonSerializable
IOException
com.fasterxml.jackson.core.JsonProcessingException
public void serializeWithType(com.fasterxml.jackson.core.JsonGenerator jsonGenerator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSerializer) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
serializeWithType
in interface com.fasterxml.jackson.databind.JsonSerializable
IOException
com.fasterxml.jackson.core.JsonProcessingException
Copyright © 2011–2017. All rights reserved.