code: public static RelativeDateTimeFormatter getInstance(
              ULocale locale,
              NumberFormat nf,
              Style style,
              DisplayContext capitalizationContext) {
          RelativeDateTimeFormatterData data = cache.get(locale);
          if (nf == null) {
              nf = NumberFormat.getInstance(locale);
          } else {
              nf = (NumberFormat) nf.clone();
          }
          return new RelativeDateTimeFormatter(
                  data.qualitativeUnitMap,
                  data.relUnitPatternMap,
                  SimpleFormatterImpl.compileToStringMinMaxArguments(
                          data.dateTimePattern, new StringBuilder(), 2, 2),
                  PluralRules.forLocale(locale),
                  nf,
                  style,
                  capitalizationContext,
                  capitalizationContext == DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ?
                      BreakIterator.getSentenceInstance(locale) : null,
                  locale);
      }
docs: Returns a RelativeDateTimeFormatter for a particular locale that uses a particular
  NumberFormat object, style, and capitalization context
  
  @param locale the locale
  @param nf the number format object. It is defensively copied to ensure thread-safety
  and immutability of this class. May be null.
  @param style the style.
  @param capitalizationContext the capitalization context.