assertIndexes method

void assertIndexes ()

Implementation

void assertIndexes() {
  if (ixFirst == null) ixFirst = 0;
  if (ixLast == null) ixLast = array.length - 1;

  if (ixLast <= ixFirst) {
    ixLast = ixFirst + 1;
  }

  if (ixFirst < 0 || ixFirst > array.length - 1) ixFirst = 0;

  if (ixLast > array.length - 1 || ixLast < 0) ixLast = array.length - 1;
}