Class SortedRangesTyped<ArrayType>

All Implemented Interfaces:
OrderedLongSet
Direct Known Subclasses:
SortedRangesLong, SortedRangesPacked

public abstract class SortedRangesTyped<ArrayType> extends SortedRanges
  • Field Details

  • Constructor Details

    • SortedRangesTyped

      protected SortedRangesTyped(int initialCapacity)
    • SortedRangesTyped

      protected SortedRangesTyped(ArrayType data)
    • SortedRangesTyped

      protected SortedRangesTyped(ArrayType data, int count, long cardinality)
  • Method Details

    • makeArray

      protected abstract ArrayType makeArray(int capacity)
    • freeArray

      protected abstract void freeArray(ArrayType arr)
    • capacityForLastIndex

      protected abstract int capacityForLastIndex(int i, boolean isDense)
    • tryMakePackedType

      protected abstract SortedRanges tryMakePackedType(int maxPos, long first, boolean isDense)
    • makeMyTypeAndOffset

      protected abstract SortedRangesTyped<ArrayType> makeMyTypeAndOffset(int initialCapacity)
      Specified by:
      makeMyTypeAndOffset in class SortedRanges
    • copyDataForMoveToNew

      protected final void copyDataForMoveToNew(SortedRanges srOut, int srcPos, int dstPos, int len)
    • copyData

      protected final void copyData(SortedRanges srOut, int srcPos, int dstPos, int len)
    • copyTo

      protected final void copyTo(SortedRanges srOut)
    • tryCompactUnsafe

      public final SortedRanges tryCompactUnsafe(int k)
      Specified by:
      tryCompactUnsafe in class SortedRanges
      Parameters:
      k - if k == 0, compact if count < capacity. k > 0, compact if (capacity - count > (capacity >> k).
    • checkSizeAndMoveData

      protected final SortedRanges checkSizeAndMoveData(int srcPos, int dstPos, int len, long first, boolean writeCheck)
      Specified by:
      checkSizeAndMoveData in class SortedRanges
    • ensureCanAppend

      protected final SortedRanges ensureCanAppend(int newLastPos, long unpackedNewLastKey, boolean writeCheck)
      Specified by:
      ensureCanAppend in class SortedRanges
    • copyData

      protected static <ArrayType> ArrayType copyData(SortedRangesTyped<ArrayType> sta)
    • copyData

      protected final void copyData(int newCapacity)
      Specified by:
      copyData in class SortedRanges
    • moveData

      protected final void moveData(int srcPos, int dstPos, int len)
      Specified by:
      moveData in class SortedRanges