Package java.util

Examples of java.util.ArrayList.listIterator()


        if (list.isEmpty())
        {
            return defaultValue;
        }

        ListIterator lit = list.listIterator();
        while (lit.hasNext())
        {
            lit.set(interpolate(lit.next()));
        }
View Full Code Here


        setCurrentArea(lineArea);
        LayoutContext lc = new LayoutContext(0);
        lc.setAlignmentContext(alignmentContext);
        setChildContext(lc);
       
        PositionIterator childPosIter = new StackingIter(positionList.listIterator());
        LayoutContext blocklc = new LayoutContext(0);
        blocklc.setLeadingSpace(new SpaceSpecifier(true));
        blocklc.setTrailingSpace(new SpaceSpecifier(false));
        blocklc.setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
        LayoutManager childLM;
View Full Code Here

    private LinkedHashSet resolveParentIds(ConfigurationData configurationData) throws MissingDependencyException, InvalidConfigException {
        Environment environment = configurationData.getEnvironment();

        LinkedHashSet parentIds = new LinkedHashSet();
        List dependencies = new ArrayList(environment.getDependencies());
        for (ListIterator iterator = dependencies.listIterator(); iterator.hasNext();) {
            Dependency dependency = (Dependency) iterator.next();
            Artifact resolvedArtifact = artifactResolver.resolveInClassLoader(dependency.getArtifact());
            if (isConfiguration(resolvedArtifact)) {
                parentIds.add(resolvedArtifact);
View Full Code Here

  public void updatedCell(Table table, TableRow row, int colIndex) {
    // first, get the old path for the row
    SortedTreeNode oldNode = (SortedTreeNode)rows.get(row);
    ArrayList oldPath = oldNode.getPath();
    ListIterator oldPathIter = oldPath.listIterator();
    // then, try reinserting the row, checking correspondance with the old path
    int j;
    boolean newPath = false;
    SortedTreeNode parent,node;
    Object value;
View Full Code Here

    list.add(new Integer(3));
    list.add(new Integer(15));
    list.add(new Integer(5));
    list.add(new Integer(1));
    list.add(new Integer(7));
    ListIterator lit = list.listIterator();
    assertTrue("Should not have previous", !lit.hasPrevious());
    assertTrue("Should have next", lit.hasNext());
    tempValue = (Integer) lit.next();
    assertTrue("next returned wrong value.  Wanted 3, got: " + tempValue,
        tempValue.intValue() == 3);
View Full Code Here

    lit2.add(new Object());
    lit2.next();
       
        //Regression test for Harmony-5808
        list = new MockArrayList();
        ListIterator it = list.listIterator();
        it.add("one");
        it.add("two");
        assertEquals(2,list.size());
  }
View Full Code Here

        path.add("/"+current.getContainmentProperty().getName());
      }
      current = current.getContainer();
    }
    buf.append("reference to: ");
    for (ListIterator i = path.listIterator(path.size()); i.hasPrevious();) {
      buf.append(i.previous());
    }
  }

  private void printReferencedDataObjects(List list) {
View Full Code Here

     * <code>addValue</code> or the argument object.
     * @return the arguments as an array of strings.
     */
    public String[] getArguments() {
        List result = new ArrayList(arguments.size() * 2);
        addArgumentsToList(result.listIterator());
        String [] res = new String[result.size()];
        return (String[]) result.toArray(res);
    }

    /**
 
View Full Code Here

    {
        checkBaseName( baseName );
       
        List entries = new ArrayList( this.entries );
       
        for( ListIterator i = entries.listIterator(); i.hasNext(); )
        {
            Entry base = ( Entry ) i.next();
            if( base.getName().equals( baseName ) )
            {
                register( i.nextIndex(), new EntryImpl( name, filter ) );
View Full Code Here

        // to be dropped.
        if (hadError) {
            do {
                hadError = false;
                didDrop = false;
                for (ListIterator i = ddl.listIterator(); i.hasNext();) {
                    Object sql = i.next();
                    if (sql != null) {
                        try {
                            s.executeUpdate(sql.toString());
                            i.set(null);
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.