Examples of lastIndexOf()


Examples of java.util.List.lastIndexOf()

      else {
        // we have seen it before, so we need to determine if this insert action is
        // is depenedent upon a previously processed action in terms of FK
        // relationships (this FK checking is done against the entity's property-state
        // associated with the action...)
        int lastPos = nameList.lastIndexOf( thisEntityName );
        Object[] states = action.getState();
        for ( int i = 0; i < states.length; i++ ) {
          for ( int j = 0; j < nameList.size(); j++ ) {
            ArrayList tmpList = ( ArrayList ) positionToAction.get( new Integer( j ) );
            for ( int k = 0; k < tmpList.size(); k++ ) {
View Full Code Here

Examples of java.util.List.lastIndexOf()

                // depends...
                // note: this is an assumption and may not be correct in the case of one-to-one
                ArrayList segmentedActionQueue = new ArrayList();
                segmentedActionQueue.add( action );
                nameList.add( thisEntityName );
                positionToAction.put(new Integer( nameList.lastIndexOf( thisEntityName ) ), segmentedActionQueue );
                continue loopInsertion;
              }
            }
          }
        }
View Full Code Here

Examples of java.util.List.lastIndexOf()

        Iterator iterator = list2.iterator();
        while (iterator.hasNext()) {
            Object element = iterator.next();
            assertEquals("lastIndexOf should return correct result",
              list1.lastIndexOf(element), list2.lastIndexOf(element));
            verify();
        }

        Object[] other = getOtherElements();
        for (int i = 0; i < other.length; i++) {
View Full Code Here

Examples of java.util.List.lastIndexOf()

     * if not found.
     * @see java.util.List#lastIndexOf(java.lang.Object)
     */
    public int lastIndexOf(Object o) {
        List list = (List) m_dependency.getService();
        return list.lastIndexOf(o);
    }

    /**
     * Gets a list iterator on the current list of available service objects.
     * The returned iterator iterates on a cached copy of the service
View Full Code Here

Examples of java.util.List.lastIndexOf()

        answer = (Boolean) manager.eval("ruby", "(java)", 1, 1, "[1, 2, 3, 4] == MODIFY_LIST.getList");
        assertTrue(answer.booleanValue());
       
        assertTrue(list.contains(new Long(3)));
        assertEquals(2, list.indexOf(new Long(3)));
        assertEquals(2, list.lastIndexOf(new Long(3)));
       
        Object[] array = list.toArray();
       
        assertEquals(4, array.length);
        assertEquals(3, ((Long) array[2]).longValue());
View Full Code Here

Examples of java.util.List.lastIndexOf()

        tryToAdd(list,"d");
        tryToAdd(list,"e");
        tryToAdd(list,"f");
        Object[] expected = list.toArray();
        for(int i=0;i<expected.length;i++) {
            assertEquals(i,list.lastIndexOf(expected[i]));
        }
        assertEquals(-1,list.indexOf("g"));
    }

    public void testListLastIndexOf2() {
View Full Code Here

Examples of java.util.List.lastIndexOf()

                lastIndexOfF = i;
            } else if("g".equals(expected[i])) {
                lastIndexOfG = i;
            }
        }
        assertEquals(lastIndexOfA,list.lastIndexOf("a"));
        assertEquals(lastIndexOfB,list.lastIndexOf("b"));
        assertEquals(lastIndexOfC,list.lastIndexOf("c"));
        assertEquals(lastIndexOfD,list.lastIndexOf("d"));
        assertEquals(lastIndexOfE,list.lastIndexOf("e"));
        assertEquals(lastIndexOfF,list.lastIndexOf("f"));
View Full Code Here

Examples of java.util.List.lastIndexOf()

            } else if("g".equals(expected[i])) {
                lastIndexOfG = i;
            }
        }
        assertEquals(lastIndexOfA,list.lastIndexOf("a"));
        assertEquals(lastIndexOfB,list.lastIndexOf("b"));
        assertEquals(lastIndexOfC,list.lastIndexOf("c"));
        assertEquals(lastIndexOfD,list.lastIndexOf("d"));
        assertEquals(lastIndexOfE,list.lastIndexOf("e"));
        assertEquals(lastIndexOfF,list.lastIndexOf("f"));
        assertEquals(lastIndexOfG,list.lastIndexOf("g"));
View Full Code Here

Examples of java.util.List.lastIndexOf()

                lastIndexOfG = i;
            }
        }
        assertEquals(lastIndexOfA,list.lastIndexOf("a"));
        assertEquals(lastIndexOfB,list.lastIndexOf("b"));
        assertEquals(lastIndexOfC,list.lastIndexOf("c"));
        assertEquals(lastIndexOfD,list.lastIndexOf("d"));
        assertEquals(lastIndexOfE,list.lastIndexOf("e"));
        assertEquals(lastIndexOfF,list.lastIndexOf("f"));
        assertEquals(lastIndexOfG,list.lastIndexOf("g"));
    }
View Full Code Here

Examples of java.util.List.lastIndexOf()

            }
        }
        assertEquals(lastIndexOfA,list.lastIndexOf("a"));
        assertEquals(lastIndexOfB,list.lastIndexOf("b"));
        assertEquals(lastIndexOfC,list.lastIndexOf("c"));
        assertEquals(lastIndexOfD,list.lastIndexOf("d"));
        assertEquals(lastIndexOfE,list.lastIndexOf("e"));
        assertEquals(lastIndexOfF,list.lastIndexOf("f"));
        assertEquals(lastIndexOfG,list.lastIndexOf("g"));
    }
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.