Uses of Interface
com.google.common.base.Function

Packages that use Function
com.google.common.base Basic utility libraries and interfaces. 
com.google.common.cache This package contains caching utilities. 
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
<A,B,C> Function<A,C>
Functions.compose(Function<B,C> g, Function<A,? extends B> f)
          Returns the composition of two functions.
static
<E> Function<Object,E>
Functions.constant(E value)
          Creates a function that returns value for any input.
static
<K,V> Function<K,V>
Functions.forMap(Map<K,? extends V> map, V defaultValue)
          Returns a function which performs a map lookup with a default value.
static
<K,V> Function<K,V>
Functions.forMap(Map<K,V> map)
          Returns a function which performs a map lookup.
static
<T> Function<T,Boolean>
Functions.forPredicate(Predicate<T> predicate)
          Creates a function that returns the same boolean output as the given predicate for all inputs.
static
<T> Function<Object,T>
Functions.forSupplier(Supplier<T> supplier)
          Returns a function that always returns the result of invoking Supplier.get() on supplier, regardless of its input.
static
<E> Function<E,E>
Functions.identity()
          Returns the identity function.
static
<T> Function<Supplier<T>,T>
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
<T extends Enum<T>>
Function<String,T>
Enums.valueOfFunction(Class<T> enumClass)
          Returns a Function that maps an Enum name to the associated Enum constant.
 

Methods in com.google.common.base with parameters of type Function
static
<F,T> Supplier<T>
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
<A,B,C> Function<A,C>
Functions.compose(Function<B,C> g, Function<A,? extends B> f)
          Returns the composition of two functions.
static
<A,B,C> Function<A,C>
Functions.compose(Function<B,C> g, Function<A,? extends B> f)
          Returns the composition of two functions.
static
<A,B> Predicate<A>
Predicates.compose(Predicate<B> predicate, Function<A,? extends B> function)
          Returns the composition of a function and a predicate.
<F> Equivalence<F>
Equivalence.onResultOf(Function<F,? extends T> function)
          Returns a new equivalence relation for F which evaluates equivalence by first applying function to the argument, then evaluating using this.
 

Uses of Function in com.google.common.cache
 

Subinterfaces of Function in com.google.common.cache
 interface Cache<K,V>
          A semi-persistent mapping from keys to values.
 

Classes in com.google.common.cache that implement Function
 class AbstractCache<K,V>
          This class provides a skeletal implementation of the Cache interface to minimize the effort required to implement this interface.
 class ForwardingCache<K,V>
          A cache which forwards all its method calls to another cache.
static class ForwardingCache.SimpleForwardingCache<K,V>
          A simplified version of ForwardingCache where subclasses can pass in an already constructed Cache as the delegete.
 

Methods in com.google.common.cache with parameters of type Function
static
<K,V> CacheLoader<K,V>
CacheLoader.from(Function<K,V> function)
          Returns a CacheLoader which creates values by applying a Function to the key.
 

Uses of Function in com.google.common.collect
 

Methods in com.google.common.collect that return Function
static
<E> Function<E,E>
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
<K,V,I extends Object & Iterable<V> & Iterator<V>>
ImmutableListMultimap<K,V>
Multimaps.index(I values, Function<? super V,K> keyFunction)
          Deprecated. use Multimaps.index(Iterator, Function) by casting values to Iterator<V>, or better yet, by implementing only Iterator and not Iterable. This method is scheduled for deletion in March 2012.
static
<K,V> ImmutableListMultimap<K,V>
Multimaps.index(Iterable<V> values, Function<? super V,K> keyFunction)
          Creates an index ImmutableListMultimap that contains the results of applying a specified function to each item in an Iterable of values.
static
<K,V> ImmutableListMultimap<K,V>
Multimaps.index(Iterator<V> values, Function<? super V,K> keyFunction)
          Creates an index ImmutableListMultimap that contains the results of applying a specified function to each item in an Iterator of values.
abstract
<K extends K0,V extends V0>
ConcurrentMap<K,V>
GenericMapMaker.makeComputingMap(Function<? super K,? extends V> computingFunction)
          Deprecated. 
<K,V> ConcurrentMap<K,V>
MapMaker.makeComputingMap(Function<? super K,? extends V> computingFunction)
          Deprecated. 
<F> Ordering<F>
Ordering.onResultOf(Function<F,? extends T> function)
          Returns a new ordering on F which orders elements by first applying a function to them, then comparing those results using this.
static
<F,T> Collection<T>
Collections2.transform(Collection<F> fromCollection, Function<? super F,T> function)
          Returns a collection that applies function to each element of fromCollection.
static
<F,T> Iterable<T>
Iterables.transform(Iterable<F> fromIterable, Function<? super F,? extends T> function)
          Returns an iterable that applies function to each element of fromIterable.
static
<F,T> Iterator<T>
Iterators.transform(Iterator<F> fromIterator, Function<? super F,? extends T> function)
          Returns an iterator that applies function to each element of fromIterator.
static
<F,T> List<T>
Lists.transform(List<F> fromList, Function<? super F,? extends T> function)
          Returns a list that applies function to each element of fromList.
static
<K,V1,V2> ListMultimap<K,V2>
Multimaps.transformValues(ListMultimap<K,V1> fromMultimap, Function<? super V1,V2> function)
          Returns a view of a ListMultimap where each value is transformed by a function.
static
<K,V1,V2> Map<K,V2>
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
<K,V1,V2> Multimap<K,V2>
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
<K,V1,V2> SortedMap<K,V2>
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
<R,C,V1,V2>
Table<R,C,V2>
Tables.transformValues(Table<R,C,V1> fromTable, Function<? super V1,V2> function)
          Returns a view of a table where each value is transformed by a function.
static
<K,V,I extends Object & Iterable<V> & Iterator<V>>
ImmutableMap<K,V>
Maps.uniqueIndex(I values, Function<? super V,K> keyFunction)
          Deprecated. use Maps.uniqueIndex(Iterator, Function) by casting values to Iterator<V>, or better yet, by implementing only Iterator and not Iterable. This method is scheduled for deletion in March 2012.
static
<K,V> ImmutableMap<K,V>
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.
static
<K,V> ImmutableMap<K,V>
Maps.uniqueIndex(Iterator<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
<I,O> ListenableFuture<O>
Futures.chain(ListenableFuture<I> input, Function<? super I,? extends ListenableFuture<? extends O>> function)
          Returns a new ListenableFuture whose result is asynchronously derived from the result of the given Future.
static
<I,O> ListenableFuture<O>
Futures.chain(ListenableFuture<I> input, Function<? super I,? extends ListenableFuture<? extends O>> function, Executor exec)
          Returns a new ListenableFuture whose result is asynchronously derived from the result of the given Future.
static
<I,O> Future<O>
Futures.lazyTransform(Future<I> future, Function<? super I,? extends O> function)
          Like Futures.transform(ListenableFuture, Function) except that the transformation function is invoked on each call to get() on the returned future.
static
<V,X extends Exception>
CheckedFuture<V,X>
Futures.makeChecked(Future<V> future, Function<Exception,X> mapper)
          Deprecated. Obtain a ListenableFuture, following the advice in its documentation and use Futures.makeChecked(ListenableFuture, Function). This method is scheduled for deletion from Guava in Guava release 11.0.
static
<V,X extends Exception>
CheckedFuture<V,X>
Futures.makeChecked(ListenableFuture<V> future, Function<Exception,X> mapper)
          Creates a CheckedFuture out of a normal ListenableFuture and a Function that maps from Exception instances into the appropriate checked type.
static
<I,O> Future<O>
Futures.transform(Future<I> future, Function<? super I,? extends O> function)
          Deprecated. Obtain a ListenableFuture (following the advice in its documentation) and use Futures.transform(ListenableFuture, Function) or use Futures.lazyTransform(Future, Function), which will apply the transformation on each call to get(). This method is scheduled for deletion from Guava in Guava release 11.0.
static
<I,O> ListenableFuture<O>
Futures.transform(ListenableFuture<I> future, Function<? super I,? extends O> function)
          Returns a new ListenableFuture whose result is the product of applying the given Function to the result of the given Future.
static
<I,O> ListenableFuture<O>
Futures.transform(ListenableFuture<I> future, Function<? super I,? extends O> function, Executor exec)
          Returns a new ListenableFuture whose result is the product of applying the given Function to the result of the given Future.
 



Copyright © 2010-2011. All Rights Reserved.