@Test public void testGetMulti() { assertThat(typedProperties.getTypedProperties("multi", String.class)).containsExactly("one", "two", "three", "four"); }
<T> List<T> getTypedProperties(final String key, final Class<T> type) { String value = properties.getProperty(key); if (Strings.isNullOrEmpty(value)) { return emptyList(); } return Lists.transform(asList(value.split("\\s*,\\s*")), new Function<String, T>() { public T apply(String input) { return convert(key, input, type); } }); }
TypedProperties { <T> List<T> getTypedProperties(final String key, final Class<T> type) { String value = properties.getProperty(key); if (Strings.isNullOrEmpty(value)) { return emptyList(); } return Lists.transform(asList(value.split("\\s*,\\s*")), new Function<String, T>() { public T apply(String input) { return convert(key, input, type); } }); } }
TypedProperties { <T> List<T> getTypedProperties(final String key, final Class<T> type) { String value = properties.getProperty(key); if (Strings.isNullOrEmpty(value)) { return emptyList(); } return Lists.transform(asList(value.split("\\s*,\\s*")), new Function<String, T>() { public T apply(String input) { return convert(key, input, type); } }); } TypedProperties(@Nonnull Properties properties); }
TypedProperties { <T> List<T> getTypedProperties(final String key, final Class<T> type) { String value = properties.getProperty(key); if (Strings.isNullOrEmpty(value)) { return emptyList(); } return Lists.transform(asList(value.split("\\s*,\\s*")), new Function<String, T>() { public T apply(String input) { return convert(key, input, type); } }); } TypedProperties(@Nonnull Properties properties);  }
TypedProperties { <T> List<T> getTypedProperties(final String key, final Class<T> type) { String value = properties.getProperty(key); if (Strings.isNullOrEmpty(value)) { return emptyList(); } return Lists.transform(asList(value.split("\\s*,\\s*")), new Function<String, T>() { public T apply(String input) { return convert(key, input, type); } }); } TypedProperties(@Nonnull Properties properties);   }