@Test public void testDescriptionTypeListConverter() { for(TestCase test : testCases) { assertEquals(converter.convert(test.input), test.expected); } }
@Override public SortedSet<DescriptionType> convert(String source) { source = source.trim(); SortedSet<DescriptionType> result = new TreeSet<>(); if(source != null && !source.isEmpty()) { for(String type : source.split("\\|")) { result.add(DescriptionType.fromString(type.trim())); } } return result; }
DescriptionTypeSetConverter implements Converter<String, SortedSet<DescriptionType>> { @Override public SortedSet<DescriptionType> convert(String source) { source = source.trim(); SortedSet<DescriptionType> result = new TreeSet<>(); if(source != null && !source.isEmpty()) { for(String type : source.split("\\|")) { result.add(DescriptionType.fromString(type.trim())); } } return result; } }
DescriptionTypeSetConverter implements Converter<String, SortedSet<DescriptionType>> { @Override public SortedSet<DescriptionType> convert(String source) { source = source.trim(); SortedSet<DescriptionType> result = new TreeSet<>(); if(source != null && !source.isEmpty()) { for(String type : source.split("\\|")) { result.add(DescriptionType.fromString(type.trim())); } } return result; }  }
DescriptionTypeSetConverter implements Converter<String, SortedSet<DescriptionType>> { @Override public SortedSet<DescriptionType> convert(String source) { source = source.trim(); SortedSet<DescriptionType> result = new TreeSet<>(); if(source != null && !source.isEmpty()) { for(String type : source.split("\\|")) { result.add(DescriptionType.fromString(type.trim())); } } return result; }  @Override SortedSet<DescriptionType> convert(String source); }
DescriptionTypeSetConverter implements Converter<String, SortedSet<DescriptionType>> { @Override public SortedSet<DescriptionType> convert(String source) { source = source.trim(); SortedSet<DescriptionType> result = new TreeSet<>(); if(source != null && !source.isEmpty()) { for(String type : source.split("\\|")) { result.add(DescriptionType.fromString(type.trim())); } } return result; }  @Override SortedSet<DescriptionType> convert(String source);  }