Examples of listIterator()


Examples of com.alibaba.fastjson.JSONArray.listIterator()

        array.addAll(Arrays.asList(1, 2, 3, 4, 5, 4, 3));
        Assert.assertEquals(2, array.indexOf(3));
        Assert.assertEquals(6, array.lastIndexOf(3));
        {
            AtomicInteger count = new AtomicInteger();
            for (ListIterator<Object> iter = array.listIterator(); iter.hasNext(); iter.next()) {
                count.incrementAndGet();
            }
            Assert.assertEquals(7, count.get());
        }
        {
View Full Code Here

Examples of com.hazelcast.core.IList.listIterator()

//    ================== Iterator ====================

    @Test
    public void testIterator() {
        IList list = newList_withInitialData(10);
        ListIterator iterator = list.listIterator();
        int i = 0;
        while (iterator.hasNext()) {
            Object o = iterator.next();
            assertEquals(o, "item" + i++);
        }
View Full Code Here

Examples of com.itextpdf.text.pdf.PdfArray.listIterator()

     */
    private static class ShowTextArray implements ContentOperator{
        public void invoke(PdfContentStreamProcessor processor, PdfLiteral operator, ArrayList<PdfObject> operands) {
            PdfArray array = (PdfArray)operands.get(0);
            float tj = 0;
            for (Iterator<PdfObject> i = array.listIterator(); i.hasNext(); ) {
                PdfObject entryObj = i.next();
                if (entryObj instanceof PdfString){
                    processor.displayPdfString((PdfString)entryObj);
                    tj = 0;
                } else {
View Full Code Here

Examples of com.linkedin.data.DataList.listIterator()

        DataList dataList = (DataList) obj;
        stringBuilder.append(URIConstants.LIST_PREFIX);
        stringBuilder.append(URIConstants.OBJ_START);
        if (!dataList.isEmpty())
        {
          ListIterator<Object> iterator = dataList.listIterator();
          encodeDataObject(iterator.next(), escaping, componentType, stringBuilder);
          while(iterator.hasNext())
          {
            stringBuilder.append(URIConstants.ITEM_SEP);
            encodeDataObject(iterator.next(), escaping, componentType, stringBuilder);
View Full Code Here

Examples of com.lowagie.text.pdf.PdfArray.listIterator()

      }
      for (int k = 1; k <= reader.getNumberOfPages(); ++k) {
        PdfArray annots = reader.getPageN(k).getAsArray(PdfName.ANNOTS);
        if (annots == null)
          continue;
        for (Iterator<PdfObject> i = annots.listIterator(); i.hasNext();) {
          PdfDictionary annot = (PdfDictionary) PdfReader
              .getPdfObject(i.next());
          PdfName subType = annot.getAsName(PdfName.SUBTYPE);
          if (!PdfName.FILEATTACHMENT.equals(subType))
            continue;
View Full Code Here

Examples of com.projity.association.AssociationList.listIterator()

  private void addAssignments(Node node){
    if (node.getImpl() instanceof HasAssignments){
      AssociationList assignments=((HasAssignments)node.getImpl()).getAssignments();
      if (assignments==null) return;
      for (ListIterator i=assignments.listIterator(assignments.size());i.hasPrevious();){
        Assignment assignment=(Assignment)i.previous();
        if (assignment.isDefault()) continue;
        Node assignmentNode=NodeFactory.getInstance().createNode(assignment);
        node.insert(assignmentNode,0);
      }
View Full Code Here

Examples of com.sun.xml.ws.api.message.HeaderList.listIterator()

     */
    private Object getMessagePart(String id){
        // FIXME : RJE - Remove cast once MessageHeaders supports asList(), hasHeaders()
        HeaderList headers = (HeaderList) securityContext.getNonSecurityHeaders();
        if(headers != null && headers.size() >0){
            Iterator<Header> listItr = headers.listIterator();
            boolean found = false;
            while(listItr.hasNext()){
                GenericSecuredHeader header = (GenericSecuredHeader)listItr.next();
                if(header.hasID(id)){
                    return header;
View Full Code Here

Examples of de.tuhrig.thofu.types.LList.listIterator()

      if(first instanceof LOperation && !(first instanceof LLambda)) {
       
        tmp.set(0, first);
      }
     
      ListIterator<LObject> iterator = tmp.listIterator();
     
      while(iterator.hasNext()) {
       
        LObject token = iterator.next();
       
View Full Code Here

Examples of edu.umd.cs.piccolo.util.PStack.listIterator()

   */
  @SuppressWarnings("unchecked")
    public static WorldObject getNodeFromPickPath(PInputEvent event,
      Class<? extends WorldObject> type) {
    PStack nodeStack = event.getPath().getNodeStackReference();
    ListIterator<Object> it = nodeStack.listIterator(nodeStack.size());

    while (it.hasPrevious()) {
      Object node = it.previous();

      if (node instanceof PiccoloNodeInWorld) {
View Full Code Here

Examples of gov.nist.javax.sip.header.RecordRouteList.listIterator()

        }

        ackRequest.removeHeader(RouteHeader.NAME);
        RouteList routeList = new RouteList();
        // start at the end of the list and walk backwards
        ListIterator<RecordRoute> li = recordRouteList.listIterator(recordRouteList.size());
        while (li.hasPrevious()) {
            RecordRoute rr = (RecordRoute) li.previous();

            Route route = new Route();
            route.setAddress((AddressImpl) ((AddressImpl) rr.getAddress()).clone());
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.