Package org.apache.commons.collections.primitives

Examples of org.apache.commons.collections.primitives.ArrayIntList


    public void testWrapNull() {
        assertNull(IntListList.wrap(null));
    }
   
    public void testWrapSerializable() {
        List list = IntListList.wrap(new ArrayIntList());
        assertNotNull(list);
        assertTrue(list instanceof Serializable);
    }
View Full Code Here


  public int length() {
    return li.length();
  }

  protected void processLines(IntRange region, List<Line> regionLines) {
    IntList values = new ArrayIntList();

    for (Line line : regionLines) {
      processLine(values, line);
    }
View Full Code Here

  public void addEventMatcher(EventMatcher eventMatcher) {
    matchers.add(eventMatcher);
  }

  protected void processLines(IntRange range, List<Line> regionLines) {
    indexed.add(new MemoryIntField(range, new ArrayIntList(0)));

    for (Line l: regionLines) {
      processLine(l);
    }
  }
View Full Code Here

  public int length() {
    return li.length();
  }

  protected void processLines(IntRange region, List<Line> regionLines) {
    IntList values = new ArrayIntList();

    for (Line line : regionLines) {
      Object requestId = line.getValue(requestField);

      RequestLine requestLine = requestsById.get(requestId);
View Full Code Here

    super(lineIndex);
    this.eventDetector = eventDetector;
  }

  protected void processLines(IntRange range, List<Line> regionLines) {
    indexed.add(new MemoryIntField(range, new ArrayIntList(0)));

    for (Line l : regionLines) {
      processLine(l);
    }
  }
View Full Code Here

  public static void main(String[] args) {
    StopWatch w = new StopWatch(1);
    w.begin(true);
    // This is slower!
    for (int i = 0; i < 1000; ++i) {
        IntList inList = new ArrayIntList(10000);
      Stop s = w.start();
      for (int j = 0; j < 10000; ++j) {
        inList.add(j);
      }
      s.stop();
    }
    w.done();
    w.print();
View Full Code Here

  public IntRange[] listUnknown() {
    return indexed.listUnknownRanges(new IntRange(0, li.length()));
  }

  protected void processLines(IntRange range, List<Line> regionLines) {
    indexed.add(new MemoryIntField(range, new ArrayIntList(0)));
  }
View Full Code Here

      return DocIdSet.EMPTY_DOCIDSET;
    } else if (docIdSet.isCacheable()) {
      return docIdSet;
    } else {
      DocIdSetIterator it = docIdSet.iterator();
      IntList docIds = new ArrayIntList();

      // null is allowed to be returned by iterator(),
      // in this case we wrap with the empty set,
      // which is cacheable.
      if (it == null) {
        return DocIdSet.EMPTY_DOCIDSET;
      } else {
        while (it.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
          docIds.add(it.docID());
        }
        return new IntListDocIdSet(docIds);
      }
    }
  }
View Full Code Here

  public IntRange[] listUnknown() {
    return indexed.listUnknownRanges(new IntRange(0, li.length()));
  }

  protected void processLines(IntRange range, List<Line> regionLines) {
    indexed.add(new MemoryIntField(range, new ArrayIntList(0)));
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.primitives.ArrayIntList

Copyright © 2018 www.massapicom. 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.