Package org.gcube.accounting.analytics
Class TemporalConstraint
java.lang.Object
org.gcube.accounting.analytics.TemporalConstraint
- Author:
- Luca Frosini (ISTI - CNR)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumValid Aggregation Modestatic enumUsed to map the Calendar constant to an enum value which has the same ordinal ofTemporalConstraint.AggregationMode -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TemporalConstraint.AggregationModestatic final TimeZoneprotected longprotected long -
Constructor Summary
ConstructorsConstructorDescriptionTemporalConstraint(long startTime, long endTime, TemporalConstraint.AggregationMode aggregationMode) -
Method Summary
Modifier and TypeMethodDescriptionstatic CalendargetAlignedCalendar(long millis, TemporalConstraint.AggregationMode aggregationMode) longgetSequenceAsStringList(Collection<Calendar> sequence) longvoidsetAggregationMode(TemporalConstraint.AggregationMode aggregationMode) voidsetEndTime(long endTime) voidsetStartTime(long startTime) static StringtimeInMillisToString(long timeInMillis) toString()
-
Field Details
-
DEFAULT_TIME_ZONE
-
startTime
protected long startTime -
endTime
protected long endTime -
aggregationMode
-
-
Constructor Details
-
TemporalConstraint
public TemporalConstraint(long startTime, long endTime, TemporalConstraint.AggregationMode aggregationMode) - Parameters:
startTime- StartTimeendTime- End TimeaggregationMode- Aggregation Mode
-
-
Method Details
-
getStartTime
public long getStartTime()- Returns:
- the startTime
-
setStartTime
public void setStartTime(long startTime) - Parameters:
startTime- the startTime to set
-
getEndTime
public long getEndTime()- Returns:
- the endTime
-
setEndTime
public void setEndTime(long endTime) - Parameters:
endTime- the endTime to set
-
getAggregationMode
- Returns:
- the aggregationMode
-
setAggregationMode
- Parameters:
aggregationMode- the aggregationMode to set
-
timeInMillisToString
-
getAlignedCalendar
public static Calendar getAlignedCalendar(long millis, TemporalConstraint.AggregationMode aggregationMode) -
getAlignedStartTime
-
getAlignedEndTime
-
getCalendarSequence
-
getSequenceAsStringList
-
toString
-