private boolean isSomethingToSave(){
  if (allowEmpty) {
    return true;
  }
  String currentInput=format(input.getText());
  return currentInput != null && !currentInput.isEmpty();
}

private boolean isSomethingToSave ( ) { if ( allowEmpty ) { return true ; } String currentInput = format ( input . getText ( ) ) ; return currentInput != null && ! currentInput . isEmpty ( ) ; }
check if there is currently something to save , based on the allowempty property and the current input ( possibly after formatting ) .
