@Test public void testIsCustomValue() { ListBoxValues processVarValues = new ListBoxValues("Constant ...", "Edit ", null); processVarValues.addCustomValue(CUSTOM_VALUE, null); assertFalse(processVarValues.isCustomValue(null)); assertFalse(processVarValues.isCustomValue(EMPTY_STRING)); assertTrue(processVarValues.isCustomValue(CUSTOM_VALUE)); }
public boolean isCustomValue(final String value) { if (value == null || value.isEmpty()) { return false; } else { return customValues.contains(getValueForDisplayValue(value)); } }
ListBoxValues { public boolean isCustomValue(final String value) { if (value == null || value.isEmpty()) { return false; } else { return customValues.contains(getValueForDisplayValue(value)); } } }
ListBoxValues { public boolean isCustomValue(final String value) { if (value == null || value.isEmpty()) { return false; } else { return customValues.contains(getValueForDisplayValue(value)); } } ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final int maxDisplayLength,
                         final boolean allowEmpty);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final int maxDisplayLength);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final boolean allowEmpty);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester);  ListBoxValues(final ListBoxValues copy,
                         final boolean copyCustomValues); }
ListBoxValues { public boolean isCustomValue(final String value) { if (value == null || value.isEmpty()) { return false; } else { return customValues.contains(getValueForDisplayValue(value)); } } ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final int maxDisplayLength,
                         final boolean allowEmpty);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final int maxDisplayLength);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final boolean allowEmpty);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester);  ListBoxValues(final ListBoxValues copy,
                         final boolean copyCustomValues); String getEditPrefix(); void addValues(final List<String> acceptableValues); void addValues(final Map<String, String> acceptableValues); String addCustomValue(final String newValue,
                                 final String oldValue); List<String> update(final String currentValue); List<String> getAcceptableValuesWithCustomValues(); List<String> getAcceptableValuesWithoutCustomValues(); boolean isCustomValue(final String value); String getValueForDisplayValue(final String key); String getDisplayNameForValue(final String value); String getNonCustomValueForUserString(final String userValue); String toString(); }
ListBoxValues { public boolean isCustomValue(final String value) { if (value == null || value.isEmpty()) { return false; } else { return customValues.contains(getValueForDisplayValue(value)); } } ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final int maxDisplayLength,
                         final boolean allowEmpty);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final int maxDisplayLength);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester,
                         final boolean allowEmpty);  ListBoxValues(final String customPrompt,
                         final String editPrefix,
                         final ValueTester valueTester);  ListBoxValues(final ListBoxValues copy,
                         final boolean copyCustomValues); String getEditPrefix(); void addValues(final List<String> acceptableValues); void addValues(final Map<String, String> acceptableValues); String addCustomValue(final String newValue,
                                 final String oldValue); List<String> update(final String currentValue); List<String> getAcceptableValuesWithCustomValues(); List<String> getAcceptableValuesWithoutCustomValues(); boolean isCustomValue(final String value); String getValueForDisplayValue(final String key); String getDisplayNameForValue(final String value); String getNonCustomValueForUserString(final String userValue); String toString(); static final String EDIT_SUFFIX; }