question: private void historyAdd ( String text ) { if ( ! text . isEmpty ( ) ) { history . remove ( text ) ; history . add ( text ) ; } }
target:  Adds the given text to the history. Mainly used when text is send. The text is removed first, so it only occurs once. Only text that is not empty is added.