Examples of subList()


Examples of it.unimi.dsi.fastutil.bytes.ByteList.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

Examples of it.unimi.dsi.fastutil.longs.LongList.subList()

        }

        SparseVector ratings = user.getTestRatings();
        LongList ideal = ratings.keysByValue(true);
        if (ideal.size() > listSize) {
            ideal = ideal.subList(0, listSize);
        }
        double idealGain = computeDCG(ideal, ratings);

        LongList actual = new LongArrayList(recommendations.size());
        for (ScoredId id: recommendations) {
View Full Code Here

Examples of java.util.AbstractList.subList()

    Double four = new Double(4.0);
    al.add(one);
    al.add(two);
    al.add(three);
    al.add(four);
    List sub = al.subList(1, 3);
    assertEquals(2, sub.size());
    // the sub.get(1) is 3.0
    assertTrue(((Double) sub.get(1)).doubleValue() <= 3.0);
    assertTrue(((Double) sub.get(1)).doubleValue() > 2.0);
View Full Code Here

Examples of java.util.ArrayList.subList()

        Date begin0 = ((KalendarEvent) arg0).getBegin();
        Date begin1 = ((KalendarEvent) arg1).getBegin();
        return begin0.compareTo(begin1);
      }
    });
    if (events.size() > MAX_EVENTS) events = events.subList(0, MAX_EVENTS);
    return events;
  }
 
  /**
   * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
View Full Code Here

Examples of java.util.ArrayList.subList()

        if (!indexedList)
        {
            if (list.size() > (endIdx-startIdx))
            {
                // Iterator hasn't restricted what is returned so do the index range restriction here
                return list.subList(startIdx, endIdx);
            }
        }
        return list;
    }
View Full Code Here

Examples of java.util.ArrayList.subList()

        }
        final Map tags2 = new HashMap();
        for(final Iterator iter = tags.keySet().iterator();iter.hasNext();) {
            final LispValue tag = (LispValue)iter.next();
            final int index = ((Integer)tags.get(tag)).intValue();
            tags2.put(tag,progns.subList(index,progns.size()));
        }

        compiler.getLegalTags().push(tags.keySet());

        final Map tags3 = new HashMap();
View Full Code Here

Examples of java.util.ArrayList.subList()

        parent.deleteChild(node.getValue());

        if (notify )
        {
          this.notifyRemove(path.subList(0,i).toArray(),indices,new Object[]{node});
        }

        node = parent;
        parent = node.getParent();
        i--;
View Full Code Here

Examples of java.util.ArrayList.subList()

    for (int i = 0; i < 10; i++) {
      al.add(new Integer(i));
    }
    assertTrue(
        "Sublist returned should have implemented Random Access interface",
        al.subList(3, 7) instanceof RandomAccess);

    List ll = new LinkedList();
    for (int i = 0; i < 10; i++) {
      ll.add(new Integer(i));
    }
View Full Code Here

Examples of java.util.ArrayList.subList()

     */
    public void test_subList_empty() {
        // Regression for HARMONY-389
        List al = new ArrayList();
        al.add("one");
        List emptySubList = al.subList(0, 0);

        try {
            emptySubList.get(0);
            fail("emptySubList.get(0) should throw IndexOutOfBoundsException");
        } catch (IndexOutOfBoundsException e) {
View Full Code Here

Examples of java.util.ArrayList.subList()

    public void test_subList_addAll() {
        // Regression for HARMONY-390
        List mainList = new ArrayList();
        Object[] mainObjects = { "a", "b", "c" };
        mainList.addAll(Arrays.asList(mainObjects));
        List subList = mainList.subList(1, 2);
        assertFalse("subList should not contain \"a\"", subList.contains("a"));
        assertFalse("subList should not contain \"c\"", subList.contains("c"));
        assertTrue("subList should contain \"b\"", subList.contains("b"));

        Object[] subObjects = { "one", "two", "three" };
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.