@Test @SuppressWarnings({ "unchecked", "rawtypes" }) public void createsRightKindOfCollection() { assertEquals( HashSet.class, new CollectionOfElementsConverter(Set.class, C_BOOLEAN).fromString("").getClass()); }
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public T fromString(String representation) { if (representation == null) { return null; } else { Collection collection = collectionProvider.get(); if (!representation.isEmpty()) { for (String part : representation.split(",")) { collection.add(elementConverter.fromString(part)); } } return (T) collection; } }
CollectionOfElementsConverter implements Converter<T> { @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public T fromString(String representation) { if (representation == null) { return null; } else { Collection collection = collectionProvider.get(); if (!representation.isEmpty()) { for (String part : representation.split(",")) { collection.add(elementConverter.fromString(part)); } } return (T) collection; } } }
CollectionOfElementsConverter implements Converter<T> { @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public T fromString(String representation) { if (representation == null) { return null; } else { Collection collection = collectionProvider.get(); if (!representation.isEmpty()) { for (String part : representation.split(",")) { collection.add(elementConverter.fromString(part)); } } return (T) collection; } } CollectionOfElementsConverter(
      Type kindOfCollection,
      Converter<?> elementConverter); }
CollectionOfElementsConverter implements Converter<T> { @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public T fromString(String representation) { if (representation == null) { return null; } else { Collection collection = collectionProvider.get(); if (!representation.isEmpty()) { for (String part : representation.split(",")) { collection.add(elementConverter.fromString(part)); } } return (T) collection; } } CollectionOfElementsConverter(
      Type kindOfCollection,
      Converter<?> elementConverter); @Override String toString(T value); @Override @SuppressWarnings({ "unchecked", "rawtypes" }) T fromString(String representation); }
CollectionOfElementsConverter implements Converter<T> { @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public T fromString(String representation) { if (representation == null) { return null; } else { Collection collection = collectionProvider.get(); if (!representation.isEmpty()) { for (String part : representation.split(",")) { collection.add(elementConverter.fromString(part)); } } return (T) collection; } } CollectionOfElementsConverter(
      Type kindOfCollection,
      Converter<?> elementConverter); @Override String toString(T value); @Override @SuppressWarnings({ "unchecked", "rawtypes" }) T fromString(String representation);  }