int end = range.getEnd(); if (blip.length() == 0 && (start != 0 || end != 0)) { throw new IndexOutOfBoundsException("Start and end have to be 0 for empty blip."); } else if (start < 0 || end < 1) { throw new IndexOutOfBoundsException("Position outside the blip."); } else if ((start >= blip.length() || end > blip.length()) && modifyHow != ModifyHow.INSERT) { throw new IndexOutOfBoundsException("Position outside the blip."); } else if (start > blip.length() && modifyHow == ModifyHow.INSERT) { throw new IndexOutOfBoundsException("Position outside the blip."); } else if (start >= end){