boolean (@NotNull JTextField textField, int initialValue, @NotNull UINumericRange range) { try { int currentValue = Integer.parseInt(textField.getText().trim()); return range.fit(currentValue) == currentValue && currentValue != initialValue; } catch (NumberFormatException e) { return false; } }