com.fasterxml.jackson.databind.util

## Class PrimitiveArrayBuilder<T>

- java.lang.Object
- - com.fasterxml.jackson.databind.util.PrimitiveArrayBuilder<T>

- Direct Known Subclasses:
    ArrayBuilders.BooleanBuilder, ArrayBuilders.ByteBuilder, ArrayBuilders.DoubleBuilder, ArrayBuilders.FloatBuilder, ArrayBuilders.IntBuilder, ArrayBuilders.LongBuilder, ArrayBuilders.ShortBuilder

      public abstract class PrimitiveArrayBuilder<T>
      extends Object

  Base class for specialized primitive array builders.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `_bufferedEntryCount` Number of total buffered entries in this buffer, counting all instances within linked list formed by following `_bufferHead`.
    `protected com.fasterxml.jackson.databind.util.PrimitiveArrayBuilder.Node<T>` | `_bufferHead`
    `protected com.fasterxml.jackson.databind.util.PrimitiveArrayBuilder.Node<T>` | `_bufferTail`
    `protected T` | `_freeBuffer`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PrimitiveArrayBuilder()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract T` | `_constructArray(int len)`
    `protected void` | `_reset()`
    `T` | `appendCompletedChunk(T fullChunk, int fullChunkLength)`
    `int` | `bufferedSize()`
    `T` | `completeAndClearBuffer(T lastChunk, int lastChunkEntries)`
    `T` | `resetAndStart()`

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

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

- - ### Field Detail

    - #### _freeBuffer

          protected T _freeBuffer

    - #### _bufferHead

          protected com.fasterxml.jackson.databind.util.PrimitiveArrayBuilder.Node<T> _bufferHead

    - #### _bufferTail

          protected com.fasterxml.jackson.databind.util.PrimitiveArrayBuilder.Node<T> _bufferTail

    - #### _bufferedEntryCount

          protected int _bufferedEntryCount

      Number of total buffered entries in this buffer, counting all instances within linked list formed by following `_bufferHead`.

  - ### Constructor Detail

    - #### PrimitiveArrayBuilder

          protected PrimitiveArrayBuilder()

  - ### Method Detail

    - #### bufferedSize

          public int bufferedSize()

    - #### resetAndStart

          public T resetAndStart()

    - #### appendCompletedChunk

          public final T appendCompletedChunk(T fullChunk,
                                              int fullChunkLength)

      Returns:
        Length of the next chunk to allocate

    - #### completeAndClearBuffer

          public T completeAndClearBuffer(T lastChunk,
                                          int lastChunkEntries)

    - #### _constructArray

          protected abstract T _constructArray(int len)

    - #### _reset

          protected void _reset()

Copyright © 2008–2020 FasterXML. All rights reserved.