Java Code Examples for java.util.concurrent.ConcurrentSkipListMap#higherKey()

The following examples show how to use java.util.concurrent.ConcurrentSkipListMap#higherKey() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConcurrentSkipListMapTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * higherKey returns next element
 */
public void testHigherKey() {
    ConcurrentSkipListMap q = map5();
    Object e1 = q.higherKey(three);
    assertEquals(four, e1);

    Object e2 = q.higherKey(zero);
    assertEquals(one, e2);

    Object e3 = q.higherKey(five);
    assertNull(e3);

    Object e4 = q.higherKey(six);
    assertNull(e4);
}
 
Example 2
Source File: ConcurrentSkipListMapTest.java    From j2objc with Apache License 2.0 5 votes vote down vote up
/**
 * higherKey returns next element
 */
public void testHigherKey() {
    ConcurrentSkipListMap q = map5();
    Object e1 = q.higherKey(three);
    assertEquals(four, e1);

    Object e2 = q.higherKey(zero);
    assertEquals(one, e2);

    Object e3 = q.higherKey(five);
    assertNull(e3);

    Object e4 = q.higherKey(six);
    assertNull(e4);
}