static final void checkInvariants()

in datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/BaseBufferImpl.java [136:149]


  static final void checkInvariants(final long start, final long pos, final long end, final long cap) {
    if ((start | pos | end | cap | (pos - start) | (end - pos) | (cap - end) ) < 0L) {
      throw new BufferPositionInvariantsException(
          "Violation of Invariants: "
              + "start: " + start
              + " <= pos: " + pos
              + " <= end: " + end
              + " <= cap: " + cap
              + "; (pos - start): " + (pos - start)
              + ", (end - pos): " + (end - pos)
              + ", (cap - end): " + (cap - end)
      );
    }
  }