Package org.apache.commons.collections15

Examples of org.apache.commons.collections15.OrderedMap.keySet()


        OrderedMap ordered = (OrderedMap) map;
        ((ResettableIterator) ordered.mapIterator()).reset();

        resetFull();
        ordered = (OrderedMap) map;
        List list = new ArrayList(ordered.keySet());
        ResettableIterator it = (ResettableIterator) ordered.mapIterator();
        assertSame(list.get(0), it.next());
        assertSame(list.get(1), it.next());
        it.reset();
        assertSame(list.get(0), it.next());
View Full Code Here


        OrderedMap ordered = (OrderedMap) map;
        ((ResettableIterator) ordered.mapIterator()).reset();

        resetFull();
        ordered = (OrderedMap) map;
        List list = new ArrayList(ordered.keySet());
        ResettableIterator it = (ResettableIterator) ordered.mapIterator();
        assertSame(list.get(0), it.next());
        assertSame(list.get(1), it.next());
        it.reset();
        assertSame(list.get(0), it.next());
View Full Code Here

    //-----------------------------------------------------------------------
    //-----------------------------------------------------------------------
    public void testBidiHeadMapContains() {
        // extra test as other tests get complex
        SortedBidiMap sm = (SortedBidiMap) makeFullMap();
        Iterator it = sm.keySet().iterator();
        Object first = it.next();
        Object toKey = it.next();
        Object second = it.next();
        Object firstValue = sm.get(first);
        Object secondValue = sm.get(second);
View Full Code Here

    public void testBidiClearByHeadMap() {
        if (isRemoveSupported() == false) return;
       
        // extra test as other tests get complex
        SortedBidiMap sm = (SortedBidiMap) makeFullMap();
        Iterator it = sm.keySet().iterator();
        Object first = it.next();
        Object second = it.next();
        Object toKey = it.next();

        Object firstValue = sm.get(first);
View Full Code Here

    //-----------------------------------------------------------------------
    //-----------------------------------------------------------------------
    public void testBidiSubMapContains() {
        // extra test as other tests get complex
        SortedBidiMap sm = (SortedBidiMap) makeFullMap();
        Iterator it = sm.keySet().iterator();
        Object first = it.next();
        Object fromKey = it.next();
        Object second = it.next();
        Object toKey = it.next();
        Object third = it.next();
View Full Code Here

    public void testBidiClearBySubMap() {
        if (isRemoveSupported() == false) return;
       
        // extra test as other tests get complex
        SortedBidiMap sm = (SortedBidiMap) makeFullMap();
        Iterator it = sm.keySet().iterator();
        it.next();
        Object fromKey = it.next();
        Object first = it.next();
        Object second = it.next();
        Object toKey = it.next();
View Full Code Here

    public void testBidiRemoveBySubMap() {
        if (isRemoveSupported() == false) return;
       
        // extra test as other tests get complex
        SortedBidiMap sm = (SortedBidiMap) makeFullMap();
        Iterator it = sm.keySet().iterator();
        it.next();
        it.next();
        Object fromKey = it.next();
        Object first = it.next();
        Object second = it.next();
View Full Code Here

    public void testBidiRemoveBySubMapEntrySet() {
        if (isRemoveSupported() == false) return;
       
        // extra test as other tests get complex
        SortedBidiMap sm = (SortedBidiMap) makeFullMap();
        Iterator it = sm.keySet().iterator();
        it.next();
        it.next();
        Object fromKey = it.next();
        Object first = it.next();
        Object second = it.next();
View Full Code Here

        // Sort by the comparator used in the makeEmptyBidiMap() method
        List newSortedKeys = Arrays.asList(getSampleKeys());
        Collections.sort(newSortedKeys, new ReverseComparator(ComparableComparator.getInstance()));
        newSortedKeys = Collections.unmodifiableList(newSortedKeys);

        Iterator mapIter = sm.keySet().iterator();
        Iterator expectedIter = newSortedKeys.iterator();
        while (expectedIter.hasNext()) {
            Object expectedKey = expectedIter.next();
            Object mapKey = mapIter.next();
            assertNotNull("key in sorted list may not be null", expectedKey);
View Full Code Here

    public void testBidiRemoveByHeadMap() {
        if (isRemoveSupported() == false) return;
       
        // extra test as other tests get complex
        SortedBidiMap sm = (SortedBidiMap) makeFullMap();
        Iterator it = sm.keySet().iterator();
        Object first = it.next();
        Object second = it.next();
        Object toKey = it.next();

        int size = sm.size();
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.