@Test public void testFirstIfExistsOrSecond() { String first; String second = "some value"; assertEquals(second, getFirstIfExistsOrSecond(null, second)); first = ""; assertEquals(second, getFirstIfExistsOrSecond(first, second)); first = "new value"; assertEquals(first, getFirstIfExistsOrSecond(first, second)); }
static String getFirstIfExistsOrSecond(String first, String second) { return isNullOrEmpty(first) ? second : first; }
MultipleInstanceVariableEditorPresenter extends FieldEditorPresenter<String> { static String getFirstIfExistsOrSecond(String first, String second) { return isNullOrEmpty(first) ? second : first; } }
MultipleInstanceVariableEditorPresenter extends FieldEditorPresenter<String> { static String getFirstIfExistsOrSecond(String first, String second) { return isNullOrEmpty(first) ? second : first; } @Inject  MultipleInstanceVariableEditorPresenter(final View view,
                                                   final SessionManager sessionManager); }
MultipleInstanceVariableEditorPresenter extends FieldEditorPresenter<String> { static String getFirstIfExistsOrSecond(String first, String second) { return isNullOrEmpty(first) ? second : first; } @Inject  MultipleInstanceVariableEditorPresenter(final View view,
                                                   final SessionManager sessionManager); @PostConstruct void init(); @Override void setValue(String value); List<String> getSimpleDataTypes(); @Override void setReadOnly(boolean readOnly); void onVariableChange(); Path getDiagramPath(); static Map<String, String> getMapDataTypeNamesToDisplayNames(); }
MultipleInstanceVariableEditorPresenter extends FieldEditorPresenter<String> { static String getFirstIfExistsOrSecond(String first, String second) { return isNullOrEmpty(first) ? second : first; } @Inject  MultipleInstanceVariableEditorPresenter(final View view,
                                                   final SessionManager sessionManager); @PostConstruct void init(); @Override void setValue(String value); List<String> getSimpleDataTypes(); @Override void setReadOnly(boolean readOnly); void onVariableChange(); Path getDiagramPath(); static Map<String, String> getMapDataTypeNamesToDisplayNames();  }