Lines Matching refs:Function
20 import com.google.common.base.Function;
438 * supplied function on its corresponding value.
441 * @param keyFunction the function used to produce the key for each value
442 * @return a map mapping the result of evaluating the function {@code
450 // invoking the function.
452 Iterable<V> values, Function<? super V, K> keyFunction) {
700 * Returns a view of a map where each value is transformed by a function. All
706 * Function<Integer, Double> sqrt = new Function<Integer, Double>() {
721 * null values provided that the function is capable of accepting null input.
722 * The transformed map might contain null values, if the function sometimes
728 * <p>The function is applied lazily, invoked when needed. This is necessary
729 * for the returned map to be a view, but it means that the function will be
731 * {@code Map.toString()}. For this to perform well, {@code function} should
736 Map<K, V1> fromMap, Function<? super V1, V2> function) {
737 return new TransformedValuesMap<K, V1, V2>(fromMap, function);
743 final Function<? super V1, V2> function;
745 TransformedValuesMap(Map<K, V1> fromMap, Function<? super V1, V2> function)
748 this.function = checkNotNull(function);
762 ? function.apply(value) : null;
767 ? function.apply(fromMap.remove(key))
806 return function.apply(entry.getValue());