org.modeshape.jcr.query

## Class NodeSequence.AlternateSizeBatch

- java.lang.Object
- - org.modeshape.jcr.query.NodeSequence.AlternateSizeBatch

- All Implemented Interfaces:
    NodeSequence.Batch, NodeSequence.RowAccessor
  Enclosing class:
    NodeSequence

      protected static class NodeSequence.AlternateSizeBatch
      extends Object
      implements NodeSequence.Batch

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `NodeSequence.AlternateSizeBatch(NodeSequence.Batch original, long newSize)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CachedNode` | `getNode()` Get the first node in the current row.
    `CachedNode` | `getNode(int index)` Get the node at the specified index in the current row.
    `float` | `getScore()` Get the score for the first node in the current row.
    `float` | `getScore(int index)` Get the score for the specified node in the current row.
    `String` | `getWorkspaceName()` Get the name of the workspace in which exists all nodes in this batch.
    `boolean` | `hasNext()` Determine if there are more rows in this batch.
    `boolean` | `isEmpty()` Determine whether this batch is empty.
    `void` | `nextRow()` Move to the next row in this batch.
    `long` | `rowCount()` Get the number of rows in the batch, if that information is available.
    `String` | `toString()`
    `int` | `width()` Get the number of nodes in each row.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### NodeSequence.AlternateSizeBatch

          protected NodeSequence.AlternateSizeBatch(NodeSequence.Batch original,
                                         long newSize)

  - ### Method Detail

    - #### rowCount

          public long rowCount()

      Description copied from interface: `NodeSequence.Batch`
      Get the number of rows in the batch, if that information is available.
      Specified by:
        `rowCount` in interface `NodeSequence.Batch`
      Returns:
        the number of rows; may be equal to -1 if the number of rows is not known without significant overhead

    - #### getWorkspaceName

          public String getWorkspaceName()

      Description copied from interface: `NodeSequence.Batch`
      Get the name of the workspace in which exists all nodes in this batch.
      Specified by:
        `getWorkspaceName` in interface `NodeSequence.Batch`
      Returns:
        the workspace name; never null

    - #### isEmpty

          public boolean isEmpty()

      Description copied from interface: `NodeSequence.Batch`
      Determine whether this batch is empty.
      Specified by:
        `isEmpty` in interface `NodeSequence.Batch`
      Returns:
        the true if there are no results, or false if there is at least some

    - #### width

          public int width()

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the number of nodes in each row.
      Specified by:
        `width` in interface `NodeSequence.RowAccessor`
      Returns:
        the width of each row; always positive

    - #### hasNext

          public boolean hasNext()

      Description copied from interface: `NodeSequence.Batch`
      Determine if there are more rows in this batch.
      Specified by:
        `hasNext` in interface `NodeSequence.Batch`
      Returns:
        true if there are more rows, or false otherwise

    - #### nextRow

          public void nextRow()

      Description copied from interface: `NodeSequence.Batch`
      Move to the next row in this batch.
      Specified by:
        `nextRow` in interface `NodeSequence.Batch`

    - #### getNode

          public CachedNode getNode()

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the first node in the current row. This is a convenience method that is equivalent to `getNode(0)`.
      Specified by:
        `getNode` in interface `NodeSequence.RowAccessor`
      Returns:
        the first node in the current row; may be null if there is no node at the first position in this row

    - #### getNode

          public CachedNode getNode(int index)

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the node at the specified index in the current row.
      Specified by:
        `getNode` in interface `NodeSequence.RowAccessor`
      Parameters:
        `index` - the 0-based index for the node in the row; must be less than `NodeSequence.RowAccessor.width()`.
      Returns:
        the specified node in the current row; may be null if there is no node at the valid index in this row

    - #### getScore

          public float getScore()

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the score for the first node in the current row. This is a convenience method that is equivalent to `getScore(0)`.
      Specified by:
        `getScore` in interface `NodeSequence.RowAccessor`
      Returns:
        the score for the first node in the current row; always 0.0f if there is no corresponding node at the valid index in this row

    - #### getScore

          public float getScore(int index)

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the score for the specified node in the current row.
      Specified by:
        `getScore` in interface `NodeSequence.RowAccessor`
      Parameters:
        `index` - the 0-based index for the node in the row; must be less than `NodeSequence.RowAccessor.width()`.
      Returns:
        the score for the specified node in the current row; always 0.0f if there is no corresponding node at the valid index in this row

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.