Examples of moveToPrevious()


Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      // System.out.println("Annotation from " + a.getBegin() + " to " + a.getEnd());
      it.moveToNext();
    }
    assertTrue(count == 32);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 32);
    // System.out.println("Size of subiterator(true, true): " + count);
    it = annotIndex.subiterator(bigAnnot, false, true);
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      it.moveToNext();
    }
    assertTrue(count == 3);
    // System.out.println("Size of subiterator(false, true): " + count);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 3);
    it = annotIndex.subiterator(bigAnnot, true, false);
    count = 0;
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      it.moveToNext();
    }
    assertTrue(count == 39);
    // System.out.println("Size of subiterator(true, false): " + count);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 39);
    it = annotIndex.subiterator(bigAnnot, false, false);
    count = 0;
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      it.moveToNext();
    }
    assertTrue(count == 4);
    // System.out.println("Size of subiterator(false, false): " + count);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 4);
    AnnotationFS sent = (AnnotationFS) this.cas.getAnnotationIndex(this.sentenceType).iterator().get();
    it = annotIndex.subiterator(sent, false, true);
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      it.moveToNext();
    }
    assertTrue(count == 2);
    // System.out.println("Size of subiterator(false, false): " + count);
    count = 0;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      ++count;
    }
    assertTrue(count == 2);
  }
 
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

    if (!isValid()) {
      return;
    }
    // Grab current iterator and dec.
    FSIterator current = (FSIterator) this.iterators.get(this.iteratorIndex);
    current.moveToPrevious();
    // If we're ok with the current iterator, return.
    if (current.isValid()) {
      return;
    }
    --this.iteratorIndex;
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

    addFS(createAnnot(3, 4));
   
    // Iterate backwards, check only that it returns correct number of FSs
    FSIterator it = getAllIndexed();
    int down = this.fsCount;
    for (it.moveToLast(); it.isValid(); it.moveToPrevious()) {
      --down;
    }
    assertTrue(down == 0);

    // Get all indexed, create copy and iterate in parallel.
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      a = (AnnotationFS) it.get();
      // System.out.println(
      // a.getType().getName() + " - " + a.getStart() + " - " +
      // a.getEnd());
      assertTrue(it.get().hashCode() == v.get(current));
      it.moveToPrevious();
      --current;
    }
    assertTrue(current == -1);
    assertFalse(it.isValid());
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      assertTrue(it.isValid());
      assertTrue(it.get().hashCode() == v.get(current));
      it.moveToNext();
      assertTrue(it.isValid());
      assertTrue(it.get().hashCode() == v.get(current + 1));
      it.moveToPrevious();
      assertTrue(it.isValid());
      assertTrue(it.get().hashCode() == v.get(current));
      ++current;
    }
View Full Code Here

Examples of org.apache.uima.cas.FSIterator.moveToPrevious()

      assertTrue(it.isValid());
      assertTrue(it.get().hashCode() == v.get(current));
      it.moveToNext();
      assertTrue(it.isValid());
      assertTrue(it.get().hashCode() == v.get(current + 1));
      it.moveToPrevious();
      assertTrue(it.isValid());
      assertTrue(it.get().hashCode() == v.get(current));
      ++current;
    }
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.