| 
 | ||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Function | |
|---|---|
| com.google.common.base | Basic utility libraries and interfaces. | 
| com.google.common.collect | This package contains generic collection interfaces and implementations, and other utilities for working with collections. | 
| com.google.common.util.concurrent | Concurrency utilities. | 
| Uses of Function in com.google.common.base | 
|---|
| Methods in com.google.common.base that return Function | ||
|---|---|---|
| static
 | Functions.compose(Function<B,C> g,
               Function<A,? extends B> f)Returns the composition of two functions. | |
| static
 | Functions.constant(E value)Creates a function that returns valuefor any input. | |
| static
 | Functions.forMap(Map<K,? extends V> map,
             V defaultValue)Returns a function which performs a map lookup with a default value. | |
| static
 | Functions.forMap(Map<K,V> map)Returns a function which performs a map lookup. | |
| static
 | Functions.forPredicate(Predicate<T> predicate)Creates a function that returns the same boolean output as the given predicate for all inputs. | |
| static
 | Functions.identity()Returns the identity function. | |
| static
 | Suppliers.supplierFunction()Returns a function that accepts a supplier and returns the result of invoking Supplier.get()on that supplier. | |
| static Function<Object,String> | Functions.toStringFunction()Returns a function that calls toString()on its argument. | |
| static
 | Enums.valueOfFunction(Class<T> enumClass)Returns a Functionthat maps anEnumname to the associatedEnumconstant. | |
| Methods in com.google.common.base with parameters of type Function | ||
|---|---|---|
| static
 | Suppliers.compose(Function<? super F,T> function,
               Supplier<F> supplier)Returns a new supplier which is the composition of the provided function and supplier. | |
| static
 | Functions.compose(Function<B,C> g,
               Function<A,? extends B> f)Returns the composition of two functions. | |
| static
 | Functions.compose(Function<B,C> g,
               Function<A,? extends B> f)Returns the composition of two functions. | |
| static
 | Predicates.compose(Predicate<B> predicate,
               Function<A,? extends B> function)Returns the composition of a function and a predicate. | |
| Uses of Function in com.google.common.collect | 
|---|
| Methods in com.google.common.collect that return Function | ||
|---|---|---|
| static
 | Interners.asFunction(Interner<E> interner)Returns a function that delegates to the Interner.intern(E)method of
 the given interner. | |
| Methods in com.google.common.collect with parameters of type Function | ||
|---|---|---|
| static
 | Multimaps.index(Iterable<V> values,
           Function<? super V,K> keyFunction)Creates an index ImmutableListMultimapthat contains the results of
 applying a specified function to each item in anIterableof
 values. | |
| abstract 
 | GenericMapMaker.makeComputingMap(Function<? super K,? extends V> computingFunction)See MapMaker.makeComputingMap(com.google.common.base.Function super K, ? extends V>). | |
| 
 | MapMaker.makeComputingMap(Function<? super K,? extends V> computingFunction)Builds a map that supports atomic, on-demand computation of values. | |
| 
 | Ordering.onResultOf(Function<F,? extends T> function)Returns a new ordering on Fwhich orders elements by first applying
 a function to them, then comparing those results usingthis. | |
| static
 | Collections2.transform(Collection<F> fromCollection,
                   Function<? super F,T> function)Returns a collection that applies functionto each element offromCollection. | |
| static
 | Iterables.transform(Iterable<F> fromIterable,
                   Function<? super F,? extends T> function)Returns an iterable that applies functionto each element offromIterable. | |
| static
 | Iterators.transform(Iterator<F> fromIterator,
                   Function<? super F,? extends T> function)Returns an iterator that applies functionto each element offromIterator. | |
| static
 | Lists.transform(List<F> fromList,
                   Function<? super F,? extends T> function)Returns a list that applies functionto each element offromList. | |
| static
 | Multimaps.transformValues(ListMultimap<K,V1> fromMultimap,
                               Function<? super V1,V2> function)Returns a view of a ListMultimapwhere each value is transformed by
 a function. | |
| static
 | Maps.transformValues(Map<K,V1> fromMap,
                               Function<? super V1,V2> function)Returns a view of a map where each value is transformed by a function. | |
| static
 | Multimaps.transformValues(Multimap<K,V1> fromMultimap,
                               Function<? super V1,V2> function)Returns a view of a multimap where each value is transformed by a function. | |
| static
 | SortedMaps.transformValues(SortedMap<K,V1> fromMap,
                               Function<? super V1,V2> function)Returns a view of a sorted map where each value is transformed by a function. | |
| static
 | Maps.uniqueIndex(Iterable<V> values,
                       Function<? super V,K> keyFunction)Returns an immutable map for which the Map.values()are the given
 elements in the given order, and each key is the product of invoking a
 supplied function on its corresponding value. | |
| Uses of Function in com.google.common.util.concurrent | 
|---|
| Methods in com.google.common.util.concurrent with parameters of type Function | ||
|---|---|---|
| static
 | Futures.chain(ListenableFuture<I> input,
           Function<? super I,? extends ListenableFuture<? extends O>> function)Returns a new ListenableFuturewhose result is asynchronously
 derived from the result of the givenFuture. | |
| static
 | Futures.chain(ListenableFuture<I> input,
           Function<? super I,? extends ListenableFuture<? extends O>> function,
           Executor exec)Returns a new ListenableFuturewhose result is asynchronously
 derived from the result of the givenFuture. | |
| static
 | Futures.makeChecked(Future<V> future,
                       Function<Exception,X> mapper)Creates a CheckedFutureout of a normalFutureand aFunctionthat maps fromExceptioninstances into the
 appropriate checked type. | |
| static
 | Futures.makeChecked(ListenableFuture<V> future,
                       Function<Exception,X> mapper)Creates a CheckedFutureout of a normalListenableFutureand aFunctionthat maps fromExceptioninstances into the
 appropriate checked type. | |
| static
 | Futures.transform(Future<I> future,
                   Function<? super I,? extends O> function)Returns a new Futurewhose result is the product of applying the
 givenFunctionto the result of the givenFuture. | |
| static
 | Futures.transform(ListenableFuture<I> future,
                   Function<? super I,? extends O> function)Returns a new ListenableFuturewhose result is the product of
 applying the givenFunctionto the result of the givenFuture. | |
| static
 | Futures.transform(ListenableFuture<I> future,
                   Function<? super I,? extends O> function,
                   Executor exec)Returns a new ListenableFuturewhose result is the product of
 applying the givenFunctionto the result of the givenFuture. | |
| 
 | ||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||