@ Override public void setContext ( DisplayContext context ) { super . setContext ( context ) ; if ( capitalizationBrkIter == null && ( context == DisplayContext . CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE || context == DisplayContext . CAPITALIZATION_FOR_UI_LIST_OR_MENU || context == DisplayContext . CAPITALIZATION_FOR_STANDALONE ) ) { capitalizationBrkIter = BreakIterator . getSentenceInstance ( locale ) ; } }
Here we override the DateFormat implementation in order to lazily initialize relevant items