Code example for TreeSet

Methods: addcontainssize

0
	/** 
	 * @tests java.util.TreeSet#add(java.lang.Object) 
	 */ 
	public void test_addLjava_lang_Object() { 
		// Test for method boolean java.util.TreeSet.add(java.lang.Object) 
		ts.add(new Integer(-8));
		assertTrue("Failed to add Object", ts.contains(new Integer(-8)));
		ts.add(objArray[0]);
		assertTrue("Added existing element", ts.size() == objArray.length + 1);
 
	} 
 
	/** 
	 * @tests java.util.TreeSet#addAll(java.util.Collection) 
	 */ 
	public void test_addAllLjava_util_Collection() { 
		// Test for method boolean 
		// java.util.TreeSet.addAll(java.util.Collection) 
		TreeSet s = new TreeSet();
		s.addAll(ts);
Stop searching for code, let great code find you!  Add Codota to your java IDE