コード例 #1
0
 /** values collection contains all values */
 public void testDescendingValues() {
   ConcurrentNavigableMap map = dmap5();
   Collection s = map.values();
   assertEquals(5, s.size());
   assertTrue(s.contains("A"));
   assertTrue(s.contains("B"));
   assertTrue(s.contains("C"));
   assertTrue(s.contains("D"));
   assertTrue(s.contains("E"));
 }
コード例 #2
0
 /** Values.toArray contains all values */
 public void testDescendingValuesToArray() {
   ConcurrentNavigableMap map = dmap5();
   Collection v = map.values();
   Object[] ar = v.toArray();
   ArrayList s = new ArrayList(Arrays.asList(ar));
   assertEquals(5, ar.length);
   assertTrue(s.contains("A"));
   assertTrue(s.contains("B"));
   assertTrue(s.contains("C"));
   assertTrue(s.contains("D"));
   assertTrue(s.contains("E"));
 }