List of usage examples for java.util NavigableSet clear
void clear();
From source file:com.google.gwt.emultest.java.util.TreeSetTest.java
public void testDescendingSet() { NavigableSet<E> set = createNavigableSet(); set.add(getKeys()[0]);/*from ww w. ja va2 s . c om*/ NavigableSet<E> descendingSet = set.descendingSet(); _assertEquals(descendingSet, descendingSet); _assertEquals(set.descendingSet(), descendingSet); set.add(getKeys()[1]); set.add(getKeys()[2]); _assertEquals(reverseCollection(set), descendingSet); _assertEquals(set, descendingSet.descendingSet()); set.remove(getKeys()[1]); _assertEquals(reverseCollection(set), descendingSet); descendingSet.add(getKeys()[0]); _assertEquals(reverseCollection(set), descendingSet); descendingSet.remove(getKeys()[1]); _assertEquals(reverseCollection(set), descendingSet); descendingSet.clear(); assertEquals(0, descendingSet.size()); _assertEquals(set, descendingSet); }