Examples of floorEntry()


Examples of edu.stanford.ppl.concurrent.SnapTreeMap.floorEntry()

    /**
     * floorEntry returns preceding entry.
     */
    public void testFloorEntry() {
        SnapTreeMap map = map5();
        Map.Entry e1 = map.floorEntry(three);
        assertEquals(three, e1.getKey());

        Map.Entry e2 = map.floorEntry(six);
        assertEquals(five, e2.getKey());

View Full Code Here

Examples of edu.stanford.ppl.concurrent.SnapTreeMap.floorEntry()

    public void testFloorEntry() {
        SnapTreeMap map = map5();
        Map.Entry e1 = map.floorEntry(three);
        assertEquals(three, e1.getKey());

        Map.Entry e2 = map.floorEntry(six);
        assertEquals(five, e2.getKey());

        Map.Entry e3 = map.floorEntry(one);
        assertEquals(one, e3.getKey());
View Full Code Here

Examples of edu.stanford.ppl.concurrent.SnapTreeMap.floorEntry()

        assertEquals(three, e1.getKey());

        Map.Entry e2 = map.floorEntry(six);
        assertEquals(five, e2.getKey());

        Map.Entry e3 = map.floorEntry(one);
        assertEquals(one, e3.getKey());

        Map.Entry e4 = map.floorEntry(zero);
        assertNull(e4);
    }
View Full Code Here

Examples of edu.stanford.ppl.concurrent.SnapTreeMap.floorEntry()

        assertEquals(five, e2.getKey());

        Map.Entry e3 = map.floorEntry(one);
        assertEquals(one, e3.getKey());

        Map.Entry e4 = map.floorEntry(zero);
        assertNull(e4);
    }

    /**
     * ceilingEntry returns next entry.
View Full Code Here

Examples of edu.stanford.ppl.concurrent.SnapTreeMap.floorEntry()

        assertEquals(one, e.getKey());
        try {
            e.setValue("X");
            shouldThrow();
        } catch (UnsupportedOperationException success) {}
        e = map.floorEntry(one);
        assertEquals(one, e.getKey());
        try {
            e.setValue("X");
            shouldThrow();
        } catch (UnsupportedOperationException success) {}
View Full Code Here

Examples of java.util.NavigableMap.floorEntry()

    }

    public void test_DescendingSubMap_floorEntry() {
        NavigableMap decendingMap = tm.descendingMap();
        String key = new Integer(-1).toString();
        assertEquals(0, decendingMap.floorEntry(key).getValue());
        for (int i = 0; i < objArray.length; i++) {
            key = objArray[i].toString();
            assertEquals(objArray[i], decendingMap.floorEntry(key).getValue());
        }
        key = new Integer(1000).toString();
View Full Code Here

Examples of java.util.NavigableMap.floorEntry()

        NavigableMap decendingMap = tm.descendingMap();
        String key = new Integer(-1).toString();
        assertEquals(0, decendingMap.floorEntry(key).getValue());
        for (int i = 0; i < objArray.length; i++) {
            key = objArray[i].toString();
            assertEquals(objArray[i], decendingMap.floorEntry(key).getValue());
        }
        key = new Integer(1000).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());
        key = new Integer(1001).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());
View Full Code Here

Examples of java.util.NavigableMap.floorEntry()

        for (int i = 0; i < objArray.length; i++) {
            key = objArray[i].toString();
            assertEquals(objArray[i], decendingMap.floorEntry(key).getValue());
        }
        key = new Integer(1000).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());
        key = new Integer(1001).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());

        decendingMap = navigableMap_startExcluded_endExcluded.descendingMap();
        key = new Integer(100).toString();
View Full Code Here

Examples of java.util.NavigableMap.floorEntry()

            assertEquals(objArray[i], decendingMap.floorEntry(key).getValue());
        }
        key = new Integer(1000).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());
        key = new Integer(1001).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());

        decendingMap = navigableMap_startExcluded_endExcluded.descendingMap();
        key = new Integer(100).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());
        for (int i = 101; i < 109; i++) {
View Full Code Here

Examples of java.util.NavigableMap.floorEntry()

        key = new Integer(1001).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());

        decendingMap = navigableMap_startExcluded_endExcluded.descendingMap();
        key = new Integer(100).toString();
        assertEquals(101, decendingMap.floorEntry(key).getValue());
        for (int i = 101; i < 109; i++) {
            key = new Integer(i).toString();
            assertEquals(i, decendingMap.floorEntry(key).getValue());
        }
        key = new Integer(109).toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.