@Test(dataProvider = "validTimeProvider") public void testGetIncrementForValidTime(TemporalElement actualElement, PropertyValue expected) { AverageDuration function = new AverageDuration("", VALID_TIME); assertEquals(expected, function.getIncrement(actualElement)); }
@Override public PropertyValue getIncrement(TemporalElement element) { PropertyValue duration = getDuration(element); if (duration.getLong() == -1L) { return Average.IGNORED_VALUE; } return PropertyValue.create(Arrays.asList(duration, ONE)); }
AverageDuration extends AbstractDurationAggregateFunction implements Average, TemporalAggregateFunction { @Override public PropertyValue getIncrement(TemporalElement element) { PropertyValue duration = getDuration(element); if (duration.getLong() == -1L) { return Average.IGNORED_VALUE; } return PropertyValue.create(Arrays.asList(duration, ONE)); } }
AverageDuration extends AbstractDurationAggregateFunction implements Average, TemporalAggregateFunction { @Override public PropertyValue getIncrement(TemporalElement element) { PropertyValue duration = getDuration(element); if (duration.getLong() == -1L) { return Average.IGNORED_VALUE; } return PropertyValue.create(Arrays.asList(duration, ONE)); } AverageDuration(String aggregatePropertyKey, TimeDimension dimension); }
AverageDuration extends AbstractDurationAggregateFunction implements Average, TemporalAggregateFunction { @Override public PropertyValue getIncrement(TemporalElement element) { PropertyValue duration = getDuration(element); if (duration.getLong() == -1L) { return Average.IGNORED_VALUE; } return PropertyValue.create(Arrays.asList(duration, ONE)); } AverageDuration(String aggregatePropertyKey, TimeDimension dimension); @Override PropertyValue getIncrement(TemporalElement element); @Override String toString(); }
AverageDuration extends AbstractDurationAggregateFunction implements Average, TemporalAggregateFunction { @Override public PropertyValue getIncrement(TemporalElement element) { PropertyValue duration = getDuration(element); if (duration.getLong() == -1L) { return Average.IGNORED_VALUE; } return PropertyValue.create(Arrays.asList(duration, ONE)); } AverageDuration(String aggregatePropertyKey, TimeDimension dimension); @Override PropertyValue getIncrement(TemporalElement element); @Override String toString();  }