IntervalSet implements TimeSet<Interval> { @Override public void clear() { size = 0; array = new double[0]; } IntervalSet();  IntervalSet(int capacity);  IntervalSet(double[] arr); @Override boolean add(Interval interval); @Override boolean remove(Interval interval); @Override int size(); @Override boolean isEmpty(); boolean contains(double timestamp); @Override boolean contains(Interval interval); double[] getIntervals(); @Override Interval[] toArray(); @Override Object toPrimitiveArray(); @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 testClear() { IntervalSet set = new IntervalSet(); set.add(new Interval(1.0, 2.0)); set.clear(); Assert.assertTrue(set.isEmpty()); Assert.assertFalse(set.contains(new Interval(1.0, 2.0))); }