Examples of LinkedList


Examples of java.util.LinkedList

        super(90f, -180f, name.intern(), iconURL);
        init();
    }

    protected void init() {
        timeStamps = new LinkedList();
        showName = false;
        renderList = new OMGraphicList();
    }

Examples of java.util.LinkedList

        PathIterator pi = s.getPathIterator(null, FLATNESS);
        int segType;
        double[] segCoords = new double[6];

        LinkedList points = new LinkedList();
        Point2D firstPoint = null;
        Point2D point;

        // split path in polylines
        do {
            segType = pi.currentSegment(segCoords);
            point = new Point2D.Double(segCoords[0], segCoords[1]);

            switch (segType) {
            case PathIterator.SEG_MOVETO:
                if (firstPoint == null)
                    firstPoint = point;

                if (points.size() > 0) {
                    // draw decorations for the previous polyline
                    draw(g, points);
                }
                // init a new polyline
                points.clear();
                points.add(point);
                break;
            case PathIterator.SEG_LINETO:
                points.add(point);
                break;
            case PathIterator.SEG_CLOSE:
                points.add(firstPoint);
                break;
            }
            pi.next();
        } while (!pi.isDone());

        // draw decorations for the last poly
        if (points.size() > 0) {
            draw(g, points);
        }
    }

Examples of java.util.LinkedList

     * @param g the Graphics to use
     * @param xcoords array of x floating coordinates
     * @param ycoords array of y floating coordinates
     */
    public void draw(Graphics g, float xcoords[], float[] ycoords) {
        LinkedList points = new LinkedList();
        for (int i = 0; i < xcoords.length; i++)
            points.add(new Point2D.Double(xcoords[i], ycoords[i]));
        draw(g, points);
    }

Examples of java.util.LinkedList

     * @param g the Graphics to use
     * @param xcoords array of x integer coordinates
     * @param ycoords array of y integer coordinates
     */
    public void draw(Graphics g, int xcoords[], int[] ycoords) {
        LinkedList points = new LinkedList();
        for (int i = 0; i < xcoords.length; i++)
            points.add(new Point2D.Double(xcoords[i], ycoords[i]));
        draw(g, points);
    }

Examples of java.util.LinkedList

     *
     * @param g the Graphics to use
     * @param points array of points
     */
    public void draw(Graphics g, Point2D[] points) {
        LinkedList pointlist = new LinkedList();
        for (int i = 0; i < points.length; i++)
            pointlist.add(points[i]);
        draw(g, pointlist);
    }

Examples of java.util.LinkedList

        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);
        }
    }

Examples of org.drools.core.util.LinkedList

        setUnificationJoin();
        super.readExternal( in );
    }

    public void writeExternal(ObjectOutput out) throws IOException {
        LinkedList list = this.constraints.getConstraints();
        if ( !list.isEmpty() ) {
            BetaNodeFieldConstraint c = ( BetaNodeFieldConstraint ) ((LinkedListEntry) list.getFirst()).getObject();
            if ( DefaultBetaConstraints.isIndexable( c ) && ((VariableConstraint) c).getRestriction() instanceof UnificationRestriction) {
                this.constraints = this.constraints.getOriginalConstraint();
            }
        }
       

Examples of org.drools.util.LinkedList

                                          final InternalReadAccessor fieldExtractor) {
        FieldIndex fieldIndex = null;

        // is linkedlist null, if so create and add
        if ( this.hashedFieldIndexes == null ) {
            this.hashedFieldIndexes = new LinkedList();
            fieldIndex = new FieldIndex( index,
                                         fieldExtractor );
            this.hashedFieldIndexes.add( fieldIndex );
        }

Examples of org.nemesis.forum.util.LinkedList

  public Cache() {
    //Our primary data structure is a hash map. The default capacity of 11
    //is too small in almost all cases, so we set it bigger.
    cachedObjectsHash = new HashMap(103);

    lastAccessedList = new LinkedList();
    ageList = new LinkedList();
  }
TOP
Copyright © 2018 www.massapi.com. 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.