Class CharBigList.CharBlock

All Implemented Interfaces:
Serializable, CharSequence, Cloneable, ICharListable
Enclosing class:
CharBigList

static class CharBigList.CharBlock extends CharGapList
A block stores in maximum blockSize number of elements. The first block in a CharBigList will grow until reaches this limit, all other blocks are directly allocated with a capacity of blockSize. A block maintains a reference count which allows a block to be shared among different CharBigList instances with a copy-on-write approach.
  • Field Details

  • Constructor Details

    • CharBlock

      public CharBlock()
    • CharBlock

      public CharBlock(int capacity)
    • CharBlock

      public CharBlock(CharBigList.CharBlock that)
  • Method Details

    • isShared

      public boolean isShared()
      Returns:
      true if block is shared by several CharBigList instances
    • ref

      public CharBigList.CharBlock ref()
      Increment reference count as block is used by one CharBigList instance more.
    • unref

      public void unref()
      Decrement reference count as block is no longer used by one CharBigList instance.