DynamicIntArray (ORC Core 1.6.5 API)
Date: 2020-10-01

org.apache.orc.impl

## Class DynamicIntArray

- java.lang.Object
- - org.apache.orc.impl.DynamicIntArray

-     public final class DynamicIntArray
      extends Object

  Dynamic int array that uses primitive types and chunks to avoid copying large number of integers when it resizes. The motivation for this class is memory optimization, i.e. space efficient storage of potentially huge arrays without good a-priori size guesses. The API of this class is between a primitive array and a AbstractList. It's not a Collection implementation because it handles primitive types, but the API could be extended to support iterators and the like. NOTE: Like standard Collection implementations/arrays, this class is not synchronized.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DynamicIntArray()`
    `DynamicIntArray(int chunkSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(int value)`
    `void` | `clear()`
    `int` | `get(int index)`
    `int` | `getSizeInBytes()`
    `void` | `increment(int index, int value)`
    `void` | `set(int index, int value)`
    `int` | `size()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### DynamicIntArray

          public DynamicIntArray()

    - #### DynamicIntArray

          public DynamicIntArray(int chunkSize)

  - ### Method Detail

    - #### get

          public int get(int index)

    - #### set

          public void set(int index,
                          int value)

    - #### increment

          public void increment(int index,
                                int value)

    - #### add

          public void add(int value)

    - #### size

          public int size()

    - #### clear

          public void clear()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getSizeInBytes

          public int getSizeInBytes()

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.