code: private static boolean isValidStartEndForLength(int start, int end, int length) {
          if (start > length || end > length) {
              return false;
          }
          return true;
      }
docs: Tells whether or not the given start and end are valid for the given length, that is both start and end are lower that
  the length.
  
  @param start the start position to be validated
  @param end the end position to be validated
  @param length the length of the contents
  @return {@code true} if the start and end positions are lower than the length, {@code false} otherwise.