Package java.util

Examples of java.util.LinkedList.listIterator()


            List names = new LinkedList();
            for (int i = 0; i < properties.length; i++) {
                names.add(properties[i].getName());
            }

            return names.listIterator();
        } catch (Exception e) {
            throw new ConfigurationException("Error retrieving attribute names for class: " + contextObj.getClass(), e);
        }
    }
}
View Full Code Here


            }
            else if (! expected.equals(actual)) {
                if (TestUtil.getFieldSpecs(LinkedListCollections.fieldSpecs[i]
                            ).equals("BigDecimal")) {
                    ListIterator expectedIT = expected.listIterator();
                    ListIterator actualIt = actual.listIterator();
                    int index = 0;
                    while (expectedIT.hasNext()) {
                        BigDecimal bigDecExpected =
                                (BigDecimal)(expectedIT.next());
                        BigDecimal bigDecActual = (BigDecimal)(actualIt.next());
View Full Code Here

     */
    public ListIterator getNextHops(Request request) {
        try {
            LinkedList llist = new LinkedList();
            llist.add(this.getNextHop(request));
            return llist.listIterator();
        } catch (SipException ex) {
            return null;
        }

    }
View Full Code Here

            else
                current = null;
        }

        Map nsDeclarations = null;
        ListIterator i = ancestorsAndSelf.listIterator(ancestorsAndSelf.size());
        while (i.hasPrevious()) {
            Element element = (Element) i.previous();
            nsDeclarations = addLocalNSDeclarations(element, nsDeclarations);
        }
View Full Code Here

     * @return the list of all arguments necessary to run the vm.
     */
    public String[] getCommandline() {
        //create the list
        List commands = new LinkedList();
        final ListIterator listIterator = commands.listIterator();
        //fill it
        addCommandsToList(listIterator);
        //convert to an array
        return (String[]) commands.toArray(new String[0]);
    }
View Full Code Here

         * @throws BuildException
         */
        public String[] getVariables() throws BuildException {

            List definitions = new LinkedList();
            ListIterator list = definitions.listIterator();
            addDefinitionsToList(list);
            if (definitions.size() == 0) {
                return null;
            } else {
                return (String[]) definitions.toArray(new String[0]);
View Full Code Here

            }
        }

        addMarkersToPage(true, isFirst(firstPos), isLast(lastPos));

        StackingIter childPosIter = new StackingIter(positionList.listIterator());
        while ((childLM = childPosIter.getNextChildLM()) != null) {
            // Add the block areas to Area
            // set the space adjustment ratio
            lc.setSpaceAdjust(layoutContext.getSpaceAdjust());
            lc.setFlags(LayoutContext.FIRST_AREA, childLM == firstLM);
View Full Code Here

                if (breakBetween != Constants.EN_AUTO) {
                    penaltyValue = -KnuthElement.INFINITE;
                    breakClass = breakBetween;
                }
                BreakElement breakElement;
                ListIterator elemIter = returnList.listIterator(returnList.size());
                ListElement elem = (ListElement) elemIter.previous();
                if (elem instanceof KnuthGlue) {
                    breakElement = (BreakElement) elemIter.previous();
                } else {
                    breakElement = (BreakElement) elem;
View Full Code Here

         * removed, because the breaking after the table will be handled by TableLM.
         * Unless the element list ends with a glue, which must be kept to accurately
         * represent the content. In such a case the break is simply disabled by setting
         * its penalty to infinite.
         */
        ListIterator elemIter = returnList.listIterator(returnList.size());
        ListElement elem = (ListElement) elemIter.previous();
        if (elem instanceof KnuthGlue) {
            BreakElement breakElement = (BreakElement) elemIter.previous();
            breakElement.setPenaltyValue(KnuthElement.INFINITE);
        } else {
View Full Code Here

        setFinished(true);

        addAnchor(returnedList);

        // "wrap" the Position stored in each list inside returnedList
        ListIterator listIterator = returnedList.listIterator();
        ListIterator elementIterator = null;
        KnuthSequence list = null;
        ListElement element = null;
        while (listIterator.hasNext()) {
            list = (KnuthSequence) listIterator.next();
View Full Code Here

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.