List of usage examples for com.google.common.collect Lists transform
@CheckReturnValue public static <F, T> List<T> transform(List<F> fromList, Function<? super F, ? extends T> function)
From source file:org.jetbrains.k2js.test.utils.LibraryFilePathsUtil.java
@NotNull public static List<String> getBasicLibraryFiles() { return Lists.transform(Config.LIB_FILE_NAMES, new Function<String, String>() { @Override/* ww w . ja v a 2s . c om*/ public String apply(@Nullable String s) { return Config.LIBRARIES_LOCATION + s; } }); }
From source file:org.opendaylight.protocol.util.InetSocketAddressUtil.java
public static List<InetSocketAddress> parseAddresses(final String address) { return Lists.transform(Arrays.asList(address.split(SEPARATOR)), input -> getInetSocketAddress(input, null)); }
From source file:com.spectralogic.ds3cli.ViewType.java
public static String valuesString() { final ArrayList<ViewType> list = Lists.newArrayList(ViewType.values()); return Joiner.on(", ").join(Lists.transform(list, new Function<ViewType, String>() { @Override//from ww w .ja va 2s .co m public String apply(final ViewType input) { return input.toString().toLowerCase(); } })); }
From source file:org.sonar.db.purge.IdUuidPairs.java
public static List<Long> ids(List<IdUuidPair> pairs) { return Lists.transform(pairs, new IdUuidPairToIdFunction()); }
From source file:org.apache.storm.sql.runtime.utils.FieldInfoUtils.java
public static List<String> getFieldNames(List<FieldInfo> fields) { return Lists.transform(fields, new FieldNameExtractor()); }
From source file:com.spectralogic.ds3client.models.bulk.Priority.java
public static String valuesString() { final ArrayList<Priority> list = Lists.newArrayList(Priority.values()); return Joiner.on(", ").join(Lists.transform(list, new Function<Priority, String>() { @Override/*from ww w. j av a 2 s .c o m*/ public String apply(@Nonnull final Priority input) { return input.toString().toLowerCase(); } })); }
From source file:com.spectralogic.ds3client.models.bulk.WriteOptimization.java
public static String valuesString() { final ArrayList<WriteOptimization> list = Lists.newArrayList(WriteOptimization.values()); return Joiner.on(", ").join(Lists.transform(list, new Function<WriteOptimization, String>() { @Override//from ww w .j ava2 s . co m public String apply(@Nonnull final WriteOptimization input) { return input.toString().toLowerCase(); } })); }
From source file:com.addthis.bundle.util.ValueObjectToString.java
public static String valueArrayToString(List<ValueObject> valueArray) { return ValueObjectToString.ARRAY_JOINER.join(Lists.transform(valueArray, INSTANCE)); }
From source file:org.jpmml.sklearn.TupleUtil.java
static public List<?> extractElement(List<Object[]> tuples, final int i) { Function<Object[], Object> function = new Function<Object[], Object>() { @Override//from w ww . jav a 2s . c om public Object apply(Object[] tuple) { return tuple[i]; } }; return Lists.transform(tuples, function); }
From source file:com.threerings.presents.tools.cpp.MethodDescriptor.java
public static List<MethodDescriptor> from(List<ServiceMethod> methods) { return Lists.transform(methods, new Function<ServiceMethod, MethodDescriptor>() { public MethodDescriptor apply(ServiceMethod from) { return new MethodDescriptor(from); }/* w w w . j a v a 2s . c o m*/ }); }