Examples of subList()


Examples of ariba.util.fieldvalue.OrderedList.sublist()

                else {
                    break;
                }
            }
            _nextGroupIndex = currentIndex;
            sublist = orderedListClassExtension.sublist(_orderedList, startIndex, _nextGroupIndex);
            // ** For convenience, push an element of the sublist into the parent.
            pushItemFromSublist(sublist);
        }
        return sublist;
    }
View Full Code Here

Examples of ca.odell.glazedlists.BasicEventList.subList()

        for(int i = 0; i < 50; i++) {
            eventList.add(new Integer(i + 100));
        }

        // get the sublist
        EventList subListBefore = (EventList)eventList.subList(25, 75);
        ListConsistencyListener.install(subListBefore);

        // change the source list to be 0,1,2,3,...49,50,51,..99,100,101...149
        for(int i = 0; i < 50; i++) {
            eventList.add(50+i, new Integer(50+i));
View Full Code Here

Examples of ca.odell.glazedlists.BasicEventList.subList()

        for(int i = 0; i < 50; i++) {
            eventList.add(50+i, new Integer(50+i));
        }

        // ensure the sublist took the change
        EventList subListAfter = (EventList)eventList.subList(25, 125);
        assertEquals(subListBefore, subListAfter);

        // change the lists again, deleting all odd numbered entries
        for(Iterator i = eventList.iterator(); i.hasNext(); ) {
            Integer current = (Integer)i.next();
View Full Code Here

Examples of ca.odell.glazedlists.BasicEventList.subList()

            Integer current = (Integer)i.next();
            if(current.intValue() % 2 == 1) i.remove();
        }

        // ensure the sublists took the change
        subListAfter = (EventList)eventList.subList(13, 63);
        assertEquals(subListBefore, subListAfter);
       
        // make some set calls
        eventList.set(15, "Fifteen");
        eventList.set(18, "Eighteen");
View Full Code Here

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

                count.incrementAndGet();
            }
            Assert.assertEquals(5, count.get());
        }
        {
            Assert.assertEquals(2, array.subList(2, 4).size());
        }
    }

    public void test_2() throws Exception {
        JSONArray array = new JSONArray();
View Full Code Here

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

//  ===================== SubList ========================

    @Test
    public void testSublist() {
        IList list = newList_withInitialData(10);
        List listTest = list.subList(3, 7);
        assertEquals(4, listTest.size());
        assertIterableEquals(listTest, "item3", "item4", "item5", "item6");
    }

    @Test(expected = IndexOutOfBoundsException.class)
View Full Code Here

Examples of com.mongodb.BasicDBList.subList()

        // Allow body to be a pipeline
        // @see http://docs.mongodb.org/manual/core/aggregation/
        if (query instanceof BasicDBList) {
            BasicDBList queryList = (BasicDBList)query;
            aggregationResult = dbCol.aggregate((DBObject)queryList.get(0), queryList
                .subList(1, queryList.size()).toArray(new BasicDBObject[queryList.size() - 1]));
        } else {
            aggregationResult = dbCol.aggregate(query);
        }
View Full Code Here

Examples of com.mongodb.BasicDBList.subList()

            // Allow body to be a pipeline
            // @see http://docs.mongodb.org/manual/core/aggregation/
            if (query instanceof BasicDBList) {
                BasicDBList queryList = (BasicDBList)query;
                aggregationResult = dbCol.aggregate((DBObject)queryList.get(0), queryList
                    .subList(1, queryList.size()).toArray(new BasicDBObject[queryList.size() - 1]));
            } else {
                aggregationResult = dbCol.aggregate(query);
            }
View Full Code Here

Examples of er.chronic.utils.Range.subList()

      if (handler.isCompatible(options) && (range = handler.matchCount(tokens, definitions)) != null) {
        if (options.isDebug()) {
          System.out.println("Chronic.tokensToSpan: date " + handler);
        }
        List<Token> goodTokens = new LinkedList<Token>();
        for (Token token : range.subList(tokens)) {
          if (token.getTag(Separator.class) == null) {
            goodTokens.add(token);
          }
        }
        return handler.getHandler().handle(goodTokens, options);
View Full Code Here

Examples of it.unimi.dsi.fastutil.bytes.ByteArrayList.subList()

                        int deletionPosition = var.getPosition() - 1;
                        leftBases = leftBases.subList(0, deletionPosition);
                        rightBases = rightBases.subList(deletionPosition, rightBases.size());

                        leftScores = leftScores.subList(0, deletionPosition);
                        rightScores = rightScores.subList(deletionPosition, rightScores.size());

                        AlignmentBlock left = AlignmentBlock.getInstance(getChr(), block.getStart(),
                                leftBases.toByteArray(new byte[leftBases.size()]),
                                leftScores.toByteArray(new byte[leftScores.size()]));
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.