class TrackSelectionUtil {

  public static int[] getBitratesUsingPastAndFutureInfo(
      Format[] formats,
      List<? extends MediaChunk> queue,
      long maxPastDurationUs,
      MediaChunkIterator[] iterators,
      long maxFutureDurationUs,
      boolean useFormatBitrateAsLowerBound,
      @Nullable int[] bitrates) {
    bitrates = getBitratesUsingFutureInfo(iterators, formats, maxFutureDurationUs, bitrates);
    getBitratesUsingPastInfo(queue, formats, maxPastDurationUs, bitrates);
    for (int i = 0; i < bitrates.length; i++) {
      int bitrate = bitrates[i];
      if (bitrate == Format.NO_VALUE
          || (useFormatBitrateAsLowerBound
              && formats[i].bitrate != Format.NO_VALUE
              && bitrate < formats[i].bitrate)) {
        bitrates[i] = formats[i].bitrate;
      }
    }
    return bitrates;
  }

  private  TrackSelectionUtil();

}