/** lowerEntry returns preceding entry. */ public void testDescendingLowerEntry() { ConcurrentNavigableMap map = dmap5(); Map.Entry e1 = map.lowerEntry(m3); assertEquals(m2, e1.getKey()); Map.Entry e2 = map.lowerEntry(m6); assertEquals(m5, e2.getKey()); Map.Entry e3 = map.lowerEntry(m1); assertNull(e3); Map.Entry e4 = map.lowerEntry(zero); assertNull(e4); }
/** lowerEntry returns preceding entry. */ public void testLowerEntry() { ConcurrentNavigableMap map = map5(); Map.Entry e1 = map.lowerEntry(three); assertEquals(two, e1.getKey()); Map.Entry e2 = map.lowerEntry(six); assertEquals(five, e2.getKey()); Map.Entry e3 = map.lowerEntry(one); assertNull(e3); Map.Entry e4 = map.lowerEntry(zero); assertNull(e4); }