Example usage for java.util LinkedList iterator

List of usage examples for java.util LinkedList iterator

Introduction

In this page you can find the example usage for java.util LinkedList iterator.

Prototype

Iterator<E> iterator();

Source Link

Document

Returns an iterator over the elements in this list in proper sequence.

Usage

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamISOLanguageTable.java

public void deleteISOLanguageByCodeIdx(CFAstAuthorization Authorization, CFAstISOLanguageByCodeIdxKey argKey) {
    CFAstISOLanguageBuff cur;/*from   w  w w  . j  a  va2  s.  c o  m*/
    LinkedList<CFAstISOLanguageBuff> matchSet = new LinkedList<CFAstISOLanguageBuff>();
    Iterator<CFAstISOLanguageBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFAstISOLanguageBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        deleteISOLanguage(Authorization, cur);
    }
}

From source file:net.semanticmetadata.lire.solr.ParallelSolrIndexer.java

@Override
public void run() {
    // check:/*  w w  w . ja v  a 2 s  .c  o  m*/
    if (fileList == null || !fileList.exists()) {
        System.err.println("No text file with a list of images given.");
        return;
    }
    System.out.println("Extracting features: ");
    for (Iterator<Class> iterator = listOfFeatures.iterator(); iterator.hasNext();) {
        System.out.println("\t" + iterator.next().getCanonicalName());
    }
    try {
        if (!individualFiles) {
            // create a BufferedOutputStream with a large buffer
            dos = new BufferedOutputStream(new FileOutputStream(outFile), 1024 * 1024 * 8);
            dos.write("<add>\n".getBytes());
        }
        Thread p = new Thread(new Producer(), "Producer");
        p.start();
        LinkedList<Thread> threads = new LinkedList<Thread>();
        long l = System.currentTimeMillis();
        for (int i = 0; i < numberOfThreads; i++) {
            Thread c = new Thread(new Consumer(), "Consumer-" + i);
            c.start();
            threads.add(c);
        }
        Thread m = new Thread(new Monitoring(), "Monitoring");
        m.start();
        for (Iterator<Thread> iterator = threads.iterator(); iterator.hasNext();) {
            iterator.next().join();
        }
        long l1 = System.currentTimeMillis() - l;
        System.out.println("Analyzed " + overallCount + " images in " + l1 / 1000 + " seconds, ~"
                + (overallCount > 0 ? (l1 / overallCount) : "inf.") + " ms each.");
        if (!individualFiles) {
            dos.write("</add>\n".getBytes());
            dos.close();
        }
        //            writer.commit();
        //            writer.close();
        //            threadFinished = true;

    } catch (Exception e) {
        e.printStackTrace();
    }

}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamISOLanguageTable.java

public void deleteISOLanguageByCountryIdx(CFAccAuthorization Authorization,
        CFAccISOLanguageByCountryIdxKey argKey) {
    CFAccISOLanguageBuff cur;/* w ww.  j  a v a2  s.  c  o m*/
    LinkedList<CFAccISOLanguageBuff> matchSet = new LinkedList<CFAccISOLanguageBuff>();
    Iterator<CFAccISOLanguageBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFAccISOLanguageBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        deleteISOLanguage(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamISOLanguageTable.java

public void deleteISOLanguageByCountryIdx(CFAstAuthorization Authorization,
        CFAstISOLanguageByCountryIdxKey argKey) {
    CFAstISOLanguageBuff cur;/*from  w  w  w.  j a  va 2 s. c  o m*/
    LinkedList<CFAstISOLanguageBuff> matchSet = new LinkedList<CFAstISOLanguageBuff>();
    Iterator<CFAstISOLanguageBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFAstISOLanguageBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        deleteISOLanguage(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamRam.CFBamRamServerProcTable.java

public void deleteServerProcByIdIdx(CFSecurityAuthorization Authorization, CFBamScopePKey argKey) {
    boolean anyNotNull = false;
    anyNotNull = true;/*from   w  w w .  j a va  2 s .  com*/
    anyNotNull = true;
    if (!anyNotNull) {
        return;
    }
    CFBamServerProcBuff cur;
    LinkedList<CFBamServerProcBuff> matchSet = new LinkedList<CFBamServerProcBuff>();
    Iterator<CFBamServerProcBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFBamServerProcBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableServerProc().readDerivedByIdIdx(Authorization, cur.getRequiredTenantId(),
                cur.getRequiredId());
        deleteServerProc(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamRam.CFBamRamServerProcTable.java

public void deleteServerProcByTenantIdx(CFSecurityAuthorization Authorization,
        CFBamScopeByTenantIdxKey argKey) {
    CFBamServerProcBuff cur;/*  www .  j  av a  2 s .  com*/
    boolean anyNotNull = false;
    anyNotNull = true;
    if (!anyNotNull) {
        return;
    }
    LinkedList<CFBamServerProcBuff> matchSet = new LinkedList<CFBamServerProcBuff>();
    Iterator<CFBamServerProcBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFBamServerProcBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableServerProc().readDerivedByIdIdx(Authorization, cur.getRequiredTenantId(),
                cur.getRequiredId());
        deleteServerProc(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamRam.CFBamRamServerProcTable.java

public void deleteServerProcByTableIdx(CFSecurityAuthorization Authorization,
        CFBamServerMethodByTableIdxKey argKey) {
    CFBamServerProcBuff cur;/* ww  w  . j  a v  a2  s.  c om*/
    boolean anyNotNull = false;
    anyNotNull = true;
    anyNotNull = true;
    if (!anyNotNull) {
        return;
    }
    LinkedList<CFBamServerProcBuff> matchSet = new LinkedList<CFBamServerProcBuff>();
    Iterator<CFBamServerProcBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFBamServerProcBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableServerProc().readDerivedByIdIdx(Authorization, cur.getRequiredTenantId(),
                cur.getRequiredId());
        deleteServerProc(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamRam.CFBamRamServerProcTable.java

public void deleteServerProcByUNameIdx(CFSecurityAuthorization Authorization,
        CFBamServerMethodByUNameIdxKey argKey) {
    CFBamServerProcBuff cur;//from  w  w  w.  j  a va2  s. c  om
    boolean anyNotNull = false;
    anyNotNull = true;
    anyNotNull = true;
    anyNotNull = true;
    if (!anyNotNull) {
        return;
    }
    LinkedList<CFBamServerProcBuff> matchSet = new LinkedList<CFBamServerProcBuff>();
    Iterator<CFBamServerProcBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFBamServerProcBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableServerProc().readDerivedByIdIdx(Authorization, cur.getRequiredTenantId(),
                cur.getRequiredId());
        deleteServerProc(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamDomainTable.java

public void deleteDomainBySubDomIdx(CFAccAuthorization Authorization, CFAccDomainBySubDomIdxKey argKey) {
    CFAccDomainBuff cur;/*from w w w .  j a  v a  2 s .c  o  m*/
    LinkedList<CFAccDomainBuff> matchSet = new LinkedList<CFAccDomainBuff>();
    Iterator<CFAccDomainBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFAccDomainBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        deleteDomain(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamDomainTable.java

public void deleteDomainByNameIdx(CFAccAuthorization Authorization, CFAccDomainByNameIdxKey argKey) {
    CFAccDomainBuff cur;/*ww w .j  a va  2  s. c  om*/
    LinkedList<CFAccDomainBuff> matchSet = new LinkedList<CFAccDomainBuff>();
    Iterator<CFAccDomainBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFAccDomainBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        deleteDomain(Authorization, cur);
    }
}