docs: @Override
    protected Double lastForComputingSegment() throws IOException {
      if (segmentRegistration.equals(SEGMENT_SORT_ASC)
          || segmentRegistration.equals(SEGMENT_BOUNDARY_ASC)) {
        return Collections.max(segmentValueTopList);
      } else if (segmentRegistration.equals(SEGMENT_SORT_DESC)
          || segmentRegistration.equals(SEGMENT_BOUNDARY_DESC)) {
        return Collections.min(segmentValueTopList);
      } else {
        throw new IOException(
            "can't compute last for segmentRegistration " + segmentRegistration);
      }
    }