Code example for LinkedList

Methods: add, contains

0
                                           targetLock,
                                           threadId,
                                           -1, 
                                           -1); 
        sourceLock.addOutgoingEdge(edge);
        if (!mNodes.contains(sourceLock)) {
            mNodes.add(sourceLock);
        } 
        if (!mNodes.contains(sourceLock)) {
            mNodes.add(sourceLock);
        } 
        return edge;
    } 
 
    private void addExpectedCycle(LockEdge[] edges) {
        Cycle cycle = new Cycle(Arrays.asList(edges));
        mExpectedCycles.add(cycle);
    } 
 
    private void assertExpectedCycles() { 
        Assert.assertEquals(mExpectedCycles, mCycleDetector.getCycles());