Examples of atEnd()


Examples of com.intellij.openapi.editor.highlighter.HighlighterIterator.atEnd()

    HighlighterIterator iterator = highlighter.createIterator(offset - 1);
    if (iterator.getTokenType() != CfmlTokenTypes.R_ANGLEBRACKET) return false;
    iterator.retreat();

    int retrieveCount = 1;
    while (!iterator.atEnd()) {
      final IElementType tokenType = iterator.getTokenType();
      if (tokenType == CfmlTokenTypes.LSLASH_ANGLEBRACKET) return false;
      if (tokenType == CfmlTokenTypes.OPENER) break;
      ++retrieveCount;
      iterator.retreat();
View Full Code Here

Examples of limelight.ui.text.TextLocation.atEnd()

    TextLocation tempLocation = model.getLocationAt(mousePoint);

    // TODO MDM - This needs work.  Ideally, the text will scroll smoothly, a pixel at a time, without the mouse moving.  The scoll speed increased as the mouse moves away.
    if(mousePoint.x < 3 && tempLocation.index > 0)
      tempLocation = tempLocation.moved(lines, -1);
    else if(mousePoint.x > (model.getContainer().getWidth() - 3) && tempLocation.atEnd(lines))
      tempLocation = tempLocation.moved(lines, +1);

    if(inWordSelectionMode)
      selectWord(tempLocation);
    else
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.atEnd()

    for (int i = 0; i < numSplit; ++i, offset += splitSize) {
      Scanner scanner = reader.createScannerByByteRange(offset, splitSize);
      int count = 0;
      key = new BytesWritable();
      value = new BytesWritable();
      while (!scanner.atEnd()) {
        scanner.entry().get(key, value);
        ++count;
        scanner.advance();
      }
      scanner.close();
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.atEnd()

      Scanner scanner = reader.createScannerByRecordNum(startRec, endRec);
      int count = 0;
      BytesWritable key = new BytesWritable();
      BytesWritable value = new BytesWritable();
      long x=startRec;
      while (!scanner.atEnd()) {
        assertEquals("Incorrect RecNum returned by scanner", scanner.getRecordNum(), x);
        scanner.entry().get(key, value);
        ++count;
        assertEquals("Incorrect RecNum returned by scanner", scanner.getRecordNum(), x);
        scanner.advance();
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.atEnd()

      scanner.close();
      Assert.assertTrue(count == (endRec - startRec));
    }
    // make sure specifying range at the end gives zero records.
    Scanner scanner = reader.createScannerByRecordNum(totalRecords, -1);
    Assert.assertTrue(scanner.atEnd());
  }
 
  static String composeSortedKey(String prefix, int total, int value) {
    return String.format("%s%010d", prefix, value);
  }
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.atEnd()

    closeOutput();

    Reader reader = new Reader(fs.open(path), fs.getFileStatus(path).getLen(), conf);
    Assert.assertTrue(reader.isSorted());
    Scanner scanner = reader.createScanner();
    Assert.assertTrue(scanner.atEnd());
    scanner.close();
    reader.close();
  }

  @Test
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.atEnd()

        new Reader(fs.open(path), fs.getFileStatus(path).getLen(), conf);
    Scanner scanner = reader.createScanner();

    try {
      for (int nx = 0; nx < count; nx++, scanner.advance()) {
        Assert.assertFalse(scanner.atEnd());
        // Assert.assertTrue(scanner.next());

        byte[] kbuf = new byte[BUF_SIZE];
        int klen = scanner.entry().getKeyLength();
        scanner.entry().getKey(kbuf);
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.atEnd()

        int vlen = scanner.entry().getValueLength();
        scanner.entry().getValue(vbuf);
        Assert.assertEquals(new String(vbuf, 0, vlen), VALUE + nx);
      }

      Assert.assertTrue(scanner.atEnd());
      Assert.assertFalse(scanner.advance());
    } finally {
      scanner.close();
      reader.close();
    }
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.atEnd()

      int klen1 = scanner.entry().getKeyLength();
      scanner.entry().getKey(kbuf1);
      Assert.assertEquals(new String(kbuf1, 0, klen1), composeSortedKey(KEY,
          recordIndex));

      if (scanner.advance() && !scanner.atEnd()) {
        // read the next key following the indexed
        byte[] kbuf2 = new byte[BUF_SIZE];
        int klen2 = scanner.entry().getKeyLength();
        scanner.entry().getKey(kbuf2);
        Assert.assertEquals(new String(kbuf2, 0, klen2), composeSortedKey(KEY,
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.atEnd()

    byte[] vbuf1 = new byte[BUF_SIZE];
    int vlen1 = scanner.entry().getValueLength();
    scanner.entry().getValue(vbuf1);
    Assert.assertEquals(new String(vbuf1, 0, vlen1), VALUE + recordIndex);

    if (scanner.advance() && !scanner.atEnd()) {
      byte[] vbuf2 = new byte[BUF_SIZE];
      int vlen2 = scanner.entry().getValueLength();
      scanner.entry().getValue(vbuf2);
      Assert.assertEquals(new String(vbuf2, 0, vlen2), VALUE
          + (recordIndex + 1));
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.