Code example for LinkedList

Methods: add, remove, size

0
    public Test insertTest(TestIdentifier testId) {
        return findTest(testId, true);
    } 
 
    private Test findTest(TestIdentifier testId, boolean insertIfMissing) {
        List<String> classNameSegments = new LinkedList<String>();
        Collections.addAll(classNameSegments, testId.getClassName().split("\\."));
        if (classNameSegments.size() <= 0) {
            CLog.e("Unrecognized package name format for test class '%s'", 
                    testId.getClassName());
            // should never happen 
            classNameSegments.add("UnknownTestClass");
        } 
            String testCaseName = classNameSegments.remove(classNameSegments.size()-1);
            return mSuiteRoot.findTest(classNameSegments, testCaseName, testId.getTestName(), insertIfMissing);
    } 
 
 
    /** 
     * Find the test result for given {@link TestIdentifier}. 
     * @param testId