IntervalMap implements TimeMap<Interval, T> { @Override public Object get(Interval interval, Estimator estimator) { if (estimator == null) { return get(interval, (T) null); } if (!isSupported(estimator)) { throw new UnsupportedOperationException("Not supported estimator."); } switch (estimator) { case AVERAGE: return getAverage(interval); case MIN: return getMin(interval); case MAX: return getMax(interval); case FIRST: return getFirst(interval); case LAST: return getLast(interval); default: throw new UnsupportedOperationException("Not supported estimator."); } } IntervalMap();  IntervalMap(int capacity); protected  IntervalMap(double[] keys); @Override boolean put(Interval interval, T value); @Override boolean remove(Interval interval); @Override Object get(Interval interval, Estimator estimator); @Override T get(Interval interval, T defaultValue); @Override T[] toValuesArray(); @Override int size(); @Override boolean isEmpty(); boolean contains(double timestamp); @Override boolean contains(Interval interval); @Override Interval[] toKeysArray(); double[] getIntervals(); @Override void clear(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(TimeFormat timeFormat, DateTimeZone timeZone); @Override String toString(TimeFormat timeFormat); @Override String toString();  }
@Test public void testEstimatorDefault() { for (IntervalMap set : getAllInstances()) { for (Estimator e : Estimator.values()) { if (set.isSupported(e)) { Assert.assertNull(set.get(new Interval(1.0, 2.0), e)); } } } }