uk.ac.starlink.table.storage

## Interface ColumnReader

-     public interface ColumnReader

  Accessor for stored values. Although several data type accessor methods are provided, in general for a given instance of this interface not all of them will give a reasonable result; it is therefore the responsibility of the user of an instance of this class to keep track of what type is appropriate, since Java's type system will not enforce it. Attempting to retrieve the wrong type of data will give a result (it must not throw an exception), but this result may not be meaningful. This point of this non-type-safe arrangement is to make it possible to access primitive objects from this interface without the overhead of object creation.

  Attempting to access a value with an index out of range for this reader will result in undefined behaviour.

  Instances of this interface are not in general safe for concurrent access from different threads.

  Since:
    25 Apr 2017

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getBooleanValue(long ix)` Retrieve the current value of this sequence as a boolean value.
    `double` | `getDoubleValue(long ix)` Retrieve the current value of this sequence as a floating point number.
    `int` | `getIntValue(long ix)` Retrieve the current value of this sequence as an integer.
    `long` | `getLongValue(long ix)` Retrieve the current value of this sequence as a long.
    `java.lang.Object` | `getObjectValue(long ix)` Retrieve the value at a given index as an object.
    `long` | `getRowCount()` Returns the number of entries in this column.

- - ### Method Detail

    - #### getRowCount

          long getRowCount()

      Returns the number of entries in this column.
      Returns:
        row count

    - #### getObjectValue

          java.lang.Object getObjectValue(long ix)
                                   throws java.io.IOException

      Retrieve the value at a given index as an object. Note it is permitted for the same instance to be returned each time, if the object is mutable it may have different values each time (for instance an array with different contents for each row). Therefore the state or contents of the returned object must not be relied on to stay the same between calls to this method.
      Parameters:
        `ix` - value index
      Returns:
        value
      Throws:
        `java.io.IOException`

    - #### getDoubleValue

          double getDoubleValue(long ix)
                         throws java.io.IOException

      Retrieve the current value of this sequence as a floating point number.
      Parameters:
        `ix` - value index
      Returns:
        best-efforts floating point value
      Throws:
        `java.io.IOException`

    - #### getIntValue

          int getIntValue(long ix)
                   throws java.io.IOException

      Retrieve the current value of this sequence as an integer.
      Parameters:
        `ix` - value index
      Returns:
        best-efforts integer value
      Throws:
        `java.io.IOException`

    - #### getLongValue

          long getLongValue(long ix)
                     throws java.io.IOException

      Retrieve the current value of this sequence as a long.
      Parameters:
        `ix` - value index
      Returns:
        best-efforts long integer value
      Throws:
        `java.io.IOException`

    - #### getBooleanValue

          boolean getBooleanValue(long ix)
                           throws java.io.IOException

      Retrieve the current value of this sequence as a boolean value.
      Parameters:
        `ix` - value index
      Returns:
        best-efforts boolean value
      Throws:
        `java.io.IOException`