Code example for TreeSet

Methods: containssize

0
	@Test 
	public void testTargets() { 
		testBoard.calcTargets(3, 3);
		TreeSet targets= testBoard.getTargets();
		testBoard.printTargets();
		Assert.assertEquals(6, targets.size());
		Assert.assertTrue(targets.contains(0));
		Assert.assertTrue(targets.contains(5));
		Assert.assertTrue(targets.contains(10));
		Assert.assertTrue(targets.contains(15));
		Assert.assertTrue(targets.contains(2));
		Assert.assertTrue(targets.contains(7));
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java