Examples of lowerEntry()


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

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

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

View Full Code Here

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

    public void testLowerEntry() {
        SnapTreeMap 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);
View Full Code Here

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

        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);
    }
View Full Code Here

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

        assertEquals(five, e2.getKey());

        Map.Entry e3 = map.lowerEntry(one);
        assertNull(e3);

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

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

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

     * lowerEntry, higherEntry, ceilingEntry, and floorEntry return
     * imutable entries
     */
    public void testEntryImmutablity() {
        SnapTreeMap map = map5();
        Map.Entry e = map.lowerEntry(three);
        assertEquals(two, e.getKey());
        try {
            e.setValue("X");
            shouldThrow();
        } catch (UnsupportedOperationException success) {}
View Full Code Here

Examples of java.util.NavigableMap.lowerEntry()

        value = new Integer(102);
        entry = decendingHeadMap.lowerEntry(value.toString());
        assertEquals(104, entry.getValue());

        value = new Integer(2);
        entry = decendingHeadMap.lowerEntry(value.toString());
        assertNull(entry);

        decendingMap = navigableMap_startIncluded_endExcluded.descendingMap();
        value = new Integer(99);
        assertNull(decendingMap.lowerEntry(value.toString()));
View Full Code Here

Examples of java.util.NavigableMap.lowerEntry()

        decendingHeadMap = decendingMap.headMap(new Integer(103).toString(),
                false);
        for (int i = 104; i < 107; i++) {
            value = new Integer(i);
            entry = decendingHeadMap.lowerEntry(value.toString());
            assertEquals(value + 1, entry.getValue());
        }
        value = new Integer(102);
        entry = decendingHeadMap.lowerEntry(value.toString());
        assertEquals(104, entry.getValue());
View Full Code Here

Examples of java.util.NavigableMap.lowerEntry()

            value = new Integer(i);
            entry = decendingHeadMap.lowerEntry(value.toString());
            assertEquals(value + 1, entry.getValue());
        }
        value = new Integer(102);
        entry = decendingHeadMap.lowerEntry(value.toString());
        assertEquals(104, entry.getValue());

        value = new Integer(2);
        entry = decendingHeadMap.lowerEntry(value.toString());
        assertNull(entry);
View Full Code Here

Examples of java.util.NavigableMap.lowerEntry()

        value = new Integer(102);
        entry = decendingHeadMap.lowerEntry(value.toString());
        assertEquals(104, entry.getValue());

        value = new Integer(2);
        entry = decendingHeadMap.lowerEntry(value.toString());
        assertNull(entry);

        decendingMap = navigableMap_startIncluded_endIncluded.descendingMap();
        value = new Integer(99);
        assertNull(decendingMap.lowerEntry(value.toString()));
View Full Code Here

Examples of java.util.NavigableMap.lowerEntry()

        decendingHeadMap = decendingMap.headMap(new Integer(103).toString(),
                false);
        for (int i = 104; i < 109; i++) {
            value = new Integer(i);
            entry = decendingHeadMap.lowerEntry(value.toString());
            assertEquals(value + 1, entry.getValue());
        }
        value = new Integer(102);
        entry = decendingHeadMap.lowerEntry(value.toString());
        assertEquals(104, entry.getValue());
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.