Package java.util

Examples of java.util.LinkedList$LLSpliterator


        if (decorations.size() == 0)
            throw new NullPointerException("No decorations");

        Iterator decorationIterator = decorations.listIterator();
        LinkedList polysegment = new LinkedList();
        Point2D[] point2DArrayType = new Point2D.Double[1];

        while (points.size() > 0) {
            if (!decorationIterator.hasNext())
                decorationIterator = decorations.listIterator();
            ShapeDecoration decor = (ShapeDecoration) decorationIterator.next();

            boolean complete = LineUtil.retrievePoints(decor.getLength(),
                    points,
                    polysegment);
            // drawing is delegated to the decoration
            decor.draw(g,
                    (Point2D[]) polysegment.toArray(point2DArrayType),
                    complete);
        }
    }
View Full Code Here


    public List getSubfields(String subfieldName) {
        Object obj = subfields.get(subfieldName);
        if (obj instanceof List) {
            return (List) obj;
        } else if (obj != null) {
            LinkedList ll = new LinkedList();
            ll.add(obj);
            return ll;
        }

        return null;
    }
View Full Code Here

     * @param file
     * @return steps
     * @throws IOException
     */
    public static List findPathSteps(File file) throws IOException {
        LinkedList steps = new LinkedList();
        steps.addFirst(file.getName());
        File parent = file;
        while ((parent = parent.getParentFile()) != null) {
            steps.addFirst(parent.getName());
        }
        return steps;
    }
View Full Code Here

    public IconPartList() {}

    protected List getList() {
        if (parts == null) {
            parts = new LinkedList();
        }
        return parts;
    }
View Full Code Here

     * @param rpfDir
     * @return List of relative path names to frames.
     */
    protected List organizeFrames(String rpfDir) {
        RpfTocHandler toc = new RpfTocHandler(rpfDir);
        List frameList = new LinkedList();

        if (toc.isValid()) {
            RpfTocEntry[] entries = toc.getEntries();
            if (verbose) {
                Debug.output("Figuring out which frames fit the criteria...");
            }
            for (int i = 0; i < entries.length; i++) {
                RpfTocEntry entry = entries[i];
                toc.loadFrameInformation(entry);

                double udinterval = (entry.coverage.nw_lat - entry.coverage.se_lat)
                        / entry.vertFrames;
                double rlinterval = (entry.coverage.se_lon - entry.coverage.nw_lon)
                        / entry.horizFrames;

                if (scale > 0) {
                    float rectScale = (float) RpfTocHandler.textScaleToLong(entry.scale);

                    if (rectScale == RpfConstants.UK.scale) {
                        if (verbose) {
                            Debug.output("  RpfTocEntry[" + i
                                    + "] scale unknown ("
                                    + entry.coverage.chartCode + "), skipping");
                        }
                        continue;
                    }

                    switch (scaleDelim) {
                    case SCALE_EQUALS:
                        if (scale == rectScale)
                            frameList.addAll(getFrameList(entry,
                                    rlinterval,
                                    udinterval));
                        break;
                    case SCALE_GREATERTHAN:
                        if (scale >= rectScale)
                            frameList.addAll(getFrameList(entry,
                                    rlinterval,
                                    udinterval));
                        break;
                    case SCALE_LESSTHAN:
                        if (scale <= rectScale)
                            frameList.addAll(getFrameList(entry,
                                    rlinterval,
                                    udinterval));
                        break;
                    case SCALE_NOTEQUALS:
                        if (scale != rectScale)
                            frameList.addAll(getFrameList(entry,
                                    rlinterval,
                                    udinterval));
                    default:
                        break;
                    } // switch

                } else {
                    frameList.addAll(getFrameList(entry, rlinterval, udinterval));
                }

            }
        }

View Full Code Here

     * @param udinterval up to down decimal degree interval for entry
     * @return List of frames that pass current settings.
     */
    protected List getFrameList(RpfTocEntry entry, double rlinterval,
                                double udinterval) {
        List frameList = new LinkedList();
       
        for (int hor = 0; hor < entry.horizFrames; hor++) {
            for (int ver = 0; ver < entry.vertFrames; ver++) {

                RpfFrameEntry frame = entry.getFrame(ver, hor);

                double left = entry.coverage.nw_lon + (rlinterval * hor);
                double right = left + rlinterval;
                double up = entry.coverage.nw_lat - (udinterval * ver);
                double down = up - udinterval;

                if (frame.exists
                        && frameFitsCriteria(left,
                                right,
                                up,
                                down,
                                rlinterval,
                                udinterval)) {
                    String name = frame.framePath.substring(frame.rpfdirIndex + 3);

                    frameList.add(name);

                    if (verbose) {
                        Debug.output(" getFrameList: adding file " + name);
                    }
                }
View Full Code Here

       
        CodeOrderOfBattle coob = new CodeOrderOfBattle();
        coob.parsePositions("oob", positionProperties);
        coob.choices.add(0, coob.getNULLCodePosition());
       
        List basicOptions = new LinkedList();
        basicOptions.add(ca);
        basicOptions.add(cstatus);
        basicOptions.add(cwm);
        basicOptions.add(csm);
        basicOptions.add(cmm);
        //      basicOptions.add(cc);
        basicOptions.add(coob);
        setCodeOptions(new CodeOptions(basicOptions));

        List warfightingOptions = new LinkedList();
        warfightingOptions.add(ca);
        warfightingOptions.add(cstatus);
        warfightingOptions.add(cwm);
        //      warfightingOptions.add(cc); // CodeCountry
        warfightingOptions.add(coob);
        // Kind of a hack, I know the number is the hierarchy number
        // of the particular scheme, and that the position.properties
        // file is setting up the options to reflect that for all of
        // these code option settings.
        ((CodeScheme) cs.getFromChoices(1)).setCodeOptions(new CodeOptions(warfightingOptions));
        //      ((CodeScheme)getFromChoices(1)).setCodeOptions(new
        // CodeOptions(warfightingOptions));

        List tacOptions = new LinkedList();
        tacOptions.add(ca);
        tacOptions.add(cstatus);
        tacOptions.add(csm);
        //      tacOptions.add(cc); // CodeCountry
        ((CodeScheme) cs.getFromChoices(2)).setCodeOptions(new CodeOptions(tacOptions));
        //      ((CodeScheme)getFromChoices(2)).setCodeOptions(new
        // CodeOptions(tacOptions));

        List intelOptions = new LinkedList();
        intelOptions.add(ca);
        intelOptions.add(cstatus);
        //      intelOptions.add(cc); // CodeCountry
        intelOptions.add(coob);
        ((CodeScheme) cs.getFromChoices(4)).setCodeOptions(new CodeOptions(intelOptions));
        //      ((CodeScheme)getFromChoices(4)).setCodeOptions(new
        // CodeOptions(intelOptions));

        List mootwOptions = new LinkedList();
        mootwOptions.add(ca);
        mootwOptions.add(cstatus);
        mootwOptions.add(cmm);
        //      mootwOptions.add(cc); // CodeCountry
        mootwOptions.add(coob);
        ((CodeScheme) cs.getFromChoices(5)).setCodeOptions(new CodeOptions(mootwOptions));
        //      ((CodeScheme)getFromChoices(5)).setCodeOptions(new
        // CodeOptions(mootwOptions));
    }
View Full Code Here

    public SymbolPart parseHierarchy(String name, Properties hierarchyProperties) {
        List positions = getPositionChoices();

        SymbolPartTree head = new SymbolPartTree(name);
        List subs = new LinkedList();
        head.setSubs(subs);

        for (Iterator it = positions.iterator(); it.hasNext();) {
            CodeScheme cs = (CodeScheme) it.next();

            if (Debug.debugging("symbolpart")) {
                Debug.output("CodePositionTree: loading " + cs.getPrettyName());
            }

            SymbolPart sp = cs.parseHierarchy(hierarchyProperties, head);
            if (sp != null) {
                subs.add(sp);
            }
        }

        return head;
    }
View Full Code Here

     * Add the CodePosition to the choices, creating the choices List
     * if needed.
     */
    public void addPositionChoice(CodePosition cp) {
        if (choices == null) {
            choices = new LinkedList();
        }
        choices.add(cp);
    }
View Full Code Here

                SymbolPart sp = new SymbolPart(cp, entry, props, parent);

                if (parentList == null) {
                    parentList = parent.getSubs();
                    if (parentList == null) {
                        parentList = new LinkedList();
                        parent.setSubs(parentList);
                    }
                }

                if (DEBUG) {
View Full Code Here

TOP

Related Classes of java.util.LinkedList$LLSpliterator

Copyright © 2018 www.massapicom. 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.