@ Override public void setContext ( DisplayContext context ) { super . setContext ( context ) ; if ( ! capitalizationInfoIsSet && ( context == DisplayContext . CAPITALIZATION_FOR_UI_LIST_OR_MENU || context == DisplayContext . CAPITALIZATION_FOR_STANDALONE ) ) { initCapitalizationContextInfo ( locale ) ; capitalizationInfoIsSet = true ; } if ( capitalizationBrkIter == null && ( context == DisplayContext . CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE || ( context == DisplayContext . CAPITALIZATION_FOR_UI_LIST_OR_MENU && capitalizationForListOrMenu ) || ( context == DisplayContext . CAPITALIZATION_FOR_STANDALONE && capitalizationForStandAlone ) ) ) { capitalizationBrkIter = BreakIterator . getSentenceInstance ( locale ) ; } }
lazily initialize relevant items