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.cfbam.v2_7.CFBamRam.CFBamRamISOLanguageTable.java

public void deleteISOLanguageByCode3Idx(CFSecurityAuthorization Authorization,
        CFSecurityISOLanguageByCode3IdxKey argKey) {
    CFSecurityISOLanguageBuff cur;/* w ww  . ja va  2 s .  c  om*/
    boolean anyNotNull = false;
    anyNotNull = true;
    if (!anyNotNull) {
        return;
    }
    LinkedList<CFSecurityISOLanguageBuff> matchSet = new LinkedList<CFSecurityISOLanguageBuff>();
    Iterator<CFSecurityISOLanguageBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFSecurityISOLanguageBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableISOLanguage().readDerivedByIdIdx(Authorization, cur.getRequiredISOLanguageId());
        deleteISOLanguage(Authorization, cur);
    }
}

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

public void deleteISOLanguageByCode2Idx(CFSecurityAuthorization Authorization,
        CFSecurityISOLanguageByCode2IdxKey argKey) {
    CFSecurityISOLanguageBuff cur;//  www  . ja v a 2 s  .  c  o m
    boolean anyNotNull = false;
    if (argKey.getOptionalISO6391Code() != null) {
        anyNotNull = true;
    }
    if (!anyNotNull) {
        return;
    }
    LinkedList<CFSecurityISOLanguageBuff> matchSet = new LinkedList<CFSecurityISOLanguageBuff>();
    Iterator<CFSecurityISOLanguageBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFSecurityISOLanguageBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableISOLanguage().readDerivedByIdIdx(Authorization, cur.getRequiredISOLanguageId());
        deleteISOLanguage(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskRam.CFAsteriskRamDomainBaseTable.java

public void deleteDomainBaseByIdIdx(CFSecurityAuthorization Authorization, CFInternetDomainBasePKey argKey) {
    final String S_ProcName = "deleteDomainBaseByIdIdx";
    CFInternetDomainBaseBuff cur;/*from w  w  w .  j av a2s . c o m*/
    LinkedList<CFInternetDomainBaseBuff> matchSet = new LinkedList<CFInternetDomainBaseBuff>();
    Iterator<CFInternetDomainBaseBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFInternetDomainBaseBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        String subClassCode = cur.getClassCode();
        if ("BDOM".equals(subClassCode)) {
            schema.getTableDomainBase().deleteDomainBase(Authorization, cur);
        } else if ("TDOM".equals(subClassCode)) {
            schema.getTableTopDomain().deleteTopDomain(Authorization, (CFInternetTopDomainBuff) cur);
        } else if ("DOMN".equals(subClassCode)) {
            schema.getTableDomain().deleteDomain(Authorization, (CFInternetDomainBuff) cur);
        } else if ("BPRJ".equals(subClassCode)) {
            schema.getTableProjectBase().deleteProjectBase(Authorization, (CFInternetProjectBaseBuff) cur);
        } else if ("RPRJ".equals(subClassCode)) {
            schema.getTableRealProject().deleteRealProject(Authorization, (CFInternetRealProjectBuff) cur);
        } else if ("TPRJ".equals(subClassCode)) {
            schema.getTableTopProject().deleteTopProject(Authorization, (CFInternetTopProjectBuff) cur);
        } else if ("SPRJ".equals(subClassCode)) {
            schema.getTableSubProject().deleteSubProject(Authorization, (CFInternetSubProjectBuff) cur);
        } else if ("VERN".equals(subClassCode)) {
            schema.getTableVersion().deleteVersion(Authorization, (CFInternetVersionBuff) cur);
        } else if ("MJVR".equals(subClassCode)) {
            schema.getTableMajorVersion().deleteMajorVersion(Authorization, (CFInternetMajorVersionBuff) cur);
        } else if ("MNVR".equals(subClassCode)) {
            schema.getTableMinorVersion().deleteMinorVersion(Authorization, (CFInternetMinorVersionBuff) cur);
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "subClassCode", cur,
                    "Instance of or subclass of DomainBase must not be \"" + subClassCode + "\"");
        }
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskRam.CFAsteriskRamDomainBaseTable.java

public void deleteDomainBaseByTenantIdx(CFSecurityAuthorization Authorization,
        CFInternetDomainBaseByTenantIdxKey argKey) {
    final String S_ProcName = "deleteDomainBaseByTenantIdx";
    CFInternetDomainBaseBuff cur;//from   www  . j  a v a 2s .c o m
    LinkedList<CFInternetDomainBaseBuff> matchSet = new LinkedList<CFInternetDomainBaseBuff>();
    Iterator<CFInternetDomainBaseBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFInternetDomainBaseBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        String subClassCode = cur.getClassCode();
        if ("BDOM".equals(subClassCode)) {
            schema.getTableDomainBase().deleteDomainBase(Authorization, cur);
        } else if ("TDOM".equals(subClassCode)) {
            schema.getTableTopDomain().deleteTopDomain(Authorization, (CFInternetTopDomainBuff) cur);
        } else if ("DOMN".equals(subClassCode)) {
            schema.getTableDomain().deleteDomain(Authorization, (CFInternetDomainBuff) cur);
        } else if ("BPRJ".equals(subClassCode)) {
            schema.getTableProjectBase().deleteProjectBase(Authorization, (CFInternetProjectBaseBuff) cur);
        } else if ("RPRJ".equals(subClassCode)) {
            schema.getTableRealProject().deleteRealProject(Authorization, (CFInternetRealProjectBuff) cur);
        } else if ("TPRJ".equals(subClassCode)) {
            schema.getTableTopProject().deleteTopProject(Authorization, (CFInternetTopProjectBuff) cur);
        } else if ("SPRJ".equals(subClassCode)) {
            schema.getTableSubProject().deleteSubProject(Authorization, (CFInternetSubProjectBuff) cur);
        } else if ("VERN".equals(subClassCode)) {
            schema.getTableVersion().deleteVersion(Authorization, (CFInternetVersionBuff) cur);
        } else if ("MJVR".equals(subClassCode)) {
            schema.getTableMajorVersion().deleteMajorVersion(Authorization, (CFInternetMajorVersionBuff) cur);
        } else if ("MNVR".equals(subClassCode)) {
            schema.getTableMinorVersion().deleteMinorVersion(Authorization, (CFInternetMinorVersionBuff) cur);
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "subClassCode", cur,
                    "Instance of or subclass of DomainBase must not be \"" + subClassCode + "\"");
        }
    }
}

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

public void deleteSecAppByIdIdx(CFSecurityAuthorization Authorization, CFSecuritySecAppPKey argKey) {
    boolean anyNotNull = false;
    anyNotNull = true;//from   w  w w .  ja  va2  s . c o m
    anyNotNull = true;
    if (!anyNotNull) {
        return;
    }
    CFSecuritySecAppBuff cur;
    LinkedList<CFSecuritySecAppBuff> matchSet = new LinkedList<CFSecuritySecAppBuff>();
    Iterator<CFSecuritySecAppBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFSecuritySecAppBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableSecApp().readDerivedByIdIdx(Authorization, cur.getRequiredClusterId(),
                cur.getRequiredSecAppId());
        deleteSecApp(Authorization, cur);
    }
}

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

public void deleteSecAppByClusterIdx(CFSecurityAuthorization Authorization,
        CFSecuritySecAppByClusterIdxKey argKey) {
    CFSecuritySecAppBuff cur;// w ww  .j  a  v a 2 s .  c o  m
    boolean anyNotNull = false;
    anyNotNull = true;
    if (!anyNotNull) {
        return;
    }
    LinkedList<CFSecuritySecAppBuff> matchSet = new LinkedList<CFSecuritySecAppBuff>();
    Iterator<CFSecuritySecAppBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFSecuritySecAppBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableSecApp().readDerivedByIdIdx(Authorization, cur.getRequiredClusterId(),
                cur.getRequiredSecAppId());
        deleteSecApp(Authorization, cur);
    }
}

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

public void deleteSecAppByUJEEMountIdx(CFSecurityAuthorization Authorization,
        CFSecuritySecAppByUJEEMountIdxKey argKey) {
    CFSecuritySecAppBuff cur;/*from w  ww.ja va2  s.c om*/
    boolean anyNotNull = false;
    anyNotNull = true;
    anyNotNull = true;
    if (!anyNotNull) {
        return;
    }
    LinkedList<CFSecuritySecAppBuff> matchSet = new LinkedList<CFSecuritySecAppBuff>();
    Iterator<CFSecuritySecAppBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFSecuritySecAppBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        cur = schema.getTableSecApp().readDerivedByIdIdx(Authorization, cur.getRequiredClusterId(),
                cur.getRequiredSecAppId());
        deleteSecApp(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfcore.v2_1.CFGenKbRam.CFGenKbRamClusterTable.java

public void deleteClusterByIdIdx(CFGenKbAuthorization Authorization, CFGenKbClusterPKey argKey) {
    CFGenKbClusterBuff cur;/*from www.j  av a  2s  . c  o m*/
    LinkedList<CFGenKbClusterBuff> matchSet = new LinkedList<CFGenKbClusterBuff>();
    Iterator<CFGenKbClusterBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFGenKbClusterBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        deleteCluster(Authorization, cur);
    }
}

From source file:net.sourceforge.msscodefactory.cfcore.v2_1.CFGenKbRam.CFGenKbRamClusterTable.java

public void deleteClusterByUDescrIdx(CFGenKbAuthorization Authorization, CFGenKbClusterByUDescrIdxKey argKey) {
    CFGenKbClusterBuff cur;/*from  w w w  . j a va  2 s .  co m*/
    LinkedList<CFGenKbClusterBuff> matchSet = new LinkedList<CFGenKbClusterBuff>();
    Iterator<CFGenKbClusterBuff> values = dictByPKey.values().iterator();
    while (values.hasNext()) {
        cur = values.next();
        if (argKey.equals(cur)) {
            matchSet.add(cur);
        }
    }
    Iterator<CFGenKbClusterBuff> iterMatch = matchSet.iterator();
    while (iterMatch.hasNext()) {
        cur = iterMatch.next();
        deleteCluster(Authorization, cur);
    }
}

From source file:com.alvermont.terraj.stargen.dole.DoleAccrete.java

/**
 * Update the band structure by removing or splitting bands from which
 * the planet would have accreted mass./*from  w w w  . j  av a 2s .com*/
 *
 * @param list The dust list to be updated
 * @param p The planet being constructed
 */
protected void updateBands(LinkedList<DustRecord> list, DolePlanetRecord p) {
    final double min = p.getRMin(); /* minimum and maximum reach of the planet */
    final double max = p.getRMax();

    final Iterator<DustRecord> i = list.iterator();

    List<DustRecord> pendingPrepend = null;

    while (i.hasNext()) {
        final DustRecord b = i.next();

        /* check for trivial rejection */
        if ((max < b.getInnerEdge()) || (min > b.getOuterEdge())) {
            continue;
        }

        if (max < b.getOuterEdge()) {
            if (min > b.getInnerEdge()) {
                /* interval within band, so split it */
                final DustRecord newband = new DustRecord(b.getInnerEdge(), min);
                b.setInnerEdge(max);

                if (pendingPrepend == null) {
                    pendingPrepend = new ArrayList<DustRecord>();
                }

                pendingPrepend.add(newband);
            } else {
                /* interval overlaps inner edge */
                b.setInnerEdge(max);
            }
        } else {
            if (min > b.getInnerEdge()) {
                /* interval overlaps outer edge */
                b.setOuterEdge(min);
            } else {
                /* interval contains band, so kill it */
                i.remove();
            }
        }
    }

    // now add the elements we couldn't because we'd have mucked up the iterator
    // java list/iterator semantics can be v. annoying sometimes
    if (pendingPrepend != null) {
        for (DustRecord newband : pendingPrepend) {
            list.addFirst(newband);
        }
    }
}