Code example for TreeSet

Methods: clearcontainssize

	 * @tests java.util.TreeSet#clear() 
	public void test_clear() { 
		// Test for method void java.util.TreeSet.clear() 
		assertEquals("Returned non-zero size after clear", 0, ts.size());
		assertTrue("Found element in cleared set", !ts.contains(objArray[0]));
	 * @tests java.util.TreeSet#clone() 
	public void test_clone() { 
		// Test for method java.lang.Object java.util.TreeSet.clone() 
		TreeSet s = (TreeSet) ts.clone();
		Iterator i = ts.iterator();
		while (i.hasNext())
			assertTrue("Clone failed to copy all elements", s
Stop searching for code, let great code find you!  Add Codota to your java IDE