コード例 #1
0
  /** ceilingEntry returns next entry. */
  public void testDescendingCeilingEntry() {
    ConcurrentNavigableMap map = dmap5();
    Map.Entry e1 = map.ceilingEntry(m3);
    assertEquals(m3, e1.getKey());

    Map.Entry e2 = map.ceilingEntry(zero);
    assertEquals(m1, e2.getKey());

    Map.Entry e3 = map.ceilingEntry(m5);
    assertEquals(m5, e3.getKey());

    Map.Entry e4 = map.ceilingEntry(m6);
    assertNull(e4);
  }
コード例 #2
0
  /** ceilingEntry returns next entry. */
  public void testCeilingEntry() {
    ConcurrentNavigableMap map = map5();
    Map.Entry e1 = map.ceilingEntry(three);
    assertEquals(three, e1.getKey());

    Map.Entry e2 = map.ceilingEntry(zero);
    assertEquals(one, e2.getKey());

    Map.Entry e3 = map.ceilingEntry(five);
    assertEquals(five, e3.getKey());

    Map.Entry e4 = map.ceilingEntry(six);
    assertNull(e4);
  }