Class BooleanBigList.BooleanBlock

All Implemented Interfaces:
Serializable, Cloneable, IBooleanListable
Enclosing class:
BooleanBigList

static class BooleanBigList.BooleanBlock extends BooleanGapList
A block stores in maximum blockSize number of elements. The first block in a BooleanBigList 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 BooleanBigList instances with a copy-on-write approach.
  • Field Details

  • Constructor Details

    • BooleanBlock

      public BooleanBlock()
    • BooleanBlock

      public BooleanBlock(int capacity)
    • BooleanBlock

      public BooleanBlock(BooleanBigList.BooleanBlock that)
  • Method Details

    • isShared

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

      Increment reference count as block is used by one BooleanBigList instance more.
    • unref

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