org.apache.poi.hssf.record

## Class SharedValueRecordBase

- java.lang.Object
- - org.apache.poi.hssf.record.RecordBase
  - - org.apache.poi.hssf.record.Record
    - - org.apache.poi.hssf.record.StandardRecord
      - - org.apache.poi.hssf.record.SharedValueRecordBase

- All Implemented Interfaces:
    Duplicatable
  Direct Known Subclasses:
    ArrayRecord, SharedFormulaRecord, TableRecord

      public abstract class SharedValueRecordBase
      extends StandardRecord

  Common base class for `SharedFormulaRecord`, `ArrayRecord` and `TableRecord` which are have similarities.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SharedValueRecordBase()`
    `protected` | `SharedValueRecordBase(CellRangeAddress8Bit range)`
    `` | `SharedValueRecordBase(LittleEndianInput in)` reads only the range (1 `CellRangeAddress8Bit`) from the stream
    `protected` | `SharedValueRecordBase(SharedValueRecordBase other)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `getDataSize()`
    `protected abstract int` | `getExtraDataSize()`
    `int` | `getFirstColumn()`
    `int` | `getFirstRow()`
    `int` | `getLastColumn()`
    `int` | `getLastRow()`
    `CellRangeAddress8Bit` | `getRange()`
    `boolean` | `isFirstCell(int rowIx, int colIx)`
    `boolean` | `isInRange(int rowIx, int colIx)`
    `void` | `serialize(LittleEndianOutput out)` Write the data content of this BIFF record.
    `protected abstract void` | `serializeExtraData(LittleEndianOutput out)`

    - ### Methods inherited from class org.apache.poi.hssf.record.StandardRecord

      `copy, getRecordSize, serialize`

    - ### Methods inherited from class org.apache.poi.hssf.record.Record

      `cloneViaReserialise, getSid, serialize, toString`

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

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

- - ### Constructor Detail

    - #### SharedValueRecordBase

          protected SharedValueRecordBase(SharedValueRecordBase other)

    - #### SharedValueRecordBase

          protected SharedValueRecordBase(CellRangeAddress8Bit range)

    - #### SharedValueRecordBase

          protected SharedValueRecordBase()

    - #### SharedValueRecordBase

          public SharedValueRecordBase(LittleEndianInput in)

      reads only the range (1 `CellRangeAddress8Bit`) from the stream
      Parameters:
        `in` - The interface for reading the record data.

  - ### Method Detail

    - #### getRange

          public final CellRangeAddress8Bit getRange()

      Returns:
        the range of cells that this record is shared across. Never `null`.

    - #### getFirstRow

          public final int getFirstRow()

    - #### getLastRow

          public final int getLastRow()

    - #### getFirstColumn

          public final int getFirstColumn()

    - #### getLastColumn

          public final int getLastColumn()

    - #### getDataSize

          protected int getDataSize()

      Specified by:
        `getDataSize` in class `StandardRecord`

    - #### getExtraDataSize

          protected abstract int getExtraDataSize()

    - #### serializeExtraData

          protected abstract void serializeExtraData(LittleEndianOutput out)

    - #### serialize

          public void serialize(LittleEndianOutput out)

      Description copied from class: `StandardRecord`
      Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.

      The number of bytes written must equal the record size reported by `RecordBase.getRecordSize()`} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).

      Specified by:
        `serialize` in class `StandardRecord`
      Parameters:
        `out` - the output object

    - #### isInRange

          public final boolean isInRange(int rowIx,
                                         int colIx)

      Parameters:
        `rowIx` - the row index
        `colIx` - the column index
      Returns:
        `true` if (rowIx, colIx) is within the range of this shared value object.
      See Also:
        `getRange()`

    - #### isFirstCell

          public final boolean isFirstCell(int rowIx,
                                           int colIx)

      Parameters:
        `rowIx` - the row index
        `colIx` - the column index
      Returns:
        `true` if (rowIx, colIx) describes the first cell in this shared value object's range
      See Also:
        `getRange()`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.