code: public void setContext(DisplayContext context) {
          if (context.type() == DisplayContext.Type.CAPITALIZATION) {
              capitalizationSetting = context;
          }
      }
docs: <strong>[icu]</strong> Set a particular DisplayContext value in the formatter,
  such as CAPITALIZATION_FOR_STANDALONE.
  
  @param context The DisplayContext value to set.