List of usage examples for java.util NavigableSet remove
boolean remove(Object o);
From source file:com.google.gwt.emultest.java.util.TreeSetTest.java
public void testDescendingSet() { NavigableSet<E> set = createNavigableSet(); set.add(getKeys()[0]);// w w w .j a v a2 s .co m 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); }