Package java.util

Examples of java.util.List.subList()


            request.setAttribute("recordList", rl);
           
            OrgaoCtrl orgaoCtrl = new OrgaoCtrl(daoFactory);
            Orgao orgao = (Orgao) orgaoCtrl.get((String) request.getSession().getAttribute(Constants.ID_SESSAO_ORGAO));
           
            request.setAttribute("extra_rows_html", ReportHelperExt.getExtraRowsHTML(request.getParameter("sel_indicador"), request.getParameter("col_names"), request.getParameter("extra_rows"), "d".equalsIgnoreCase(request.getParameter("r_modo_exibicao")), rl.subList(0, rl.size() - 1), request.getParameter("h_locais"), orgao));
            request.setAttribute("query", query);
           
           
        } catch (Throwable t) {
            t.printStackTrace();
View Full Code Here


                                Map nd = (Map)trail.get(0);
                                String firstTrailContentId = (String)nd.get("contentId");
                                if (UtilValidate.isNotEmpty(firstTrailContentId)
                                    && UtilValidate.isNotEmpty(lastPassedContentId)
                                    && firstTrailContentId.equals(lastPassedContentId) ) {
                                    csvTrail += "," + ContentWorker.nodeTrailToCsv(trail.subList(1, trail.size()));
                                } else {
                                    csvTrail += "," + ContentWorker.nodeTrailToCsv(trail);
                                }
                            }
                        }
View Full Code Here

        // lets limit the count
        if (maximumEntryCount > 0) {
            List entries = feed.getEntries();
            int size = entries.size();
            if (size > maximumEntryCount) {
                entries.subList(maximumEntryCount, size).clear();
            }
        }
    }

    protected SyndFeed loadOrCreateFeed() throws IllegalArgumentException, FeedException, IOException {
View Full Code Here

        if (start < 0) start = 0;
        if (end < 0 || end > args.size()) end = args.size();

        ListData result = new ListData();
        if (start < end) {
            Iterator i = args.subList(start, end).iterator();
            while (i.hasNext())
                result.add(i.next());
        }

        return result;
View Full Code Here

        if (start < 0) start = 0;
        if (end < 0 || end > args.size()) end = args.size();

        ListData result = new ListData();
        if (start < end) {
            Iterator i = args.subList(start, end).iterator();
            while (i.hasNext())
                result.add(i.next());
        }

        return result;
View Full Code Here

               if (room < size)
               {
                  added = room;
                  if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Notification queue is full, enqueued " + room + " notifications out of " + size + ", exceeding will be lost");
               }
               notificationQueue.addAll(notifs.subList(0, added));
            }
            else
            {
               notificationQueue.addAll(notifs);
            }
View Full Code Here

            mcsEndInt = new Integer(((String [])mcsEnd)[0]).intValue();
        }
        Map attributes = new HashMap();
        attributes.put(COUNT_ATTRIBUTE,new Integer(items.size()));
       
        items = items.subList(mcsStartInt,mcsEndInt);
       
        Iterator iter = items.iterator();
        openGalleryElement(out,attributes,"items");
        while(iter.hasNext()){
            openGalleryElement(out,new HashMap(),"item");
View Full Code Here

                boolean bSomethingAdded = false;
                if (prevLM != this) {
                    //log.debug(" BLM.getChangedKnuthElements> chiamata da "
                    //    + fromIndex + " a " + workListIterator.previousIndex() + " su "
                    //    + prevLM.getClass().getName());
                    returnedList.addAll(prevLM.getChangedKnuthElements(workList.subList(
                                fromIndex, workListIterator.previousIndex()), alignment));
                    bSomethingAdded = true;
                } else {
                    // prevLM == this
                    // do nothing
View Full Code Here

                                             currElement.getLayoutManager();
            if (currLM != this) {
                //log.debug(" BLM.getChangedKnuthElements> chiamata da " + fromIndex
                //  + " a " + oldList.size() + " su " + currLM.getClass().getName());
                returnedList.addAll(currLM.getChangedKnuthElements(
                        workList.subList(fromIndex, workList.size()), alignment));
            } else {
                // currLM == this
                // there are no more elements to add
                // remove the last penalty added to returnedList
                if (returnedList.size() > 0) {
View Full Code Here

        Collections.shuffle(bel, new Random(53672));
        assertEquals(replay, bel);

        List s = new ArrayList(bel);
        Collections.shuffle(s);
        s = s.subList(10, 90);
        bel.retainAll(s);
        assertEquals(replay, bel);

        s = new ArrayList(bel);
        Collections.shuffle(s);
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.