| Package | Description | 
|---|---|
| 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.escape | Interfaces, utilities, and simple implementations of escapers and encoders. | 
| com.google.common.util.concurrent | Concurrency utilities. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | Converter<A,B>A function from  AtoBwith an associated reverse function fromBtoA; used for converting back and forth between different representations of the same
 information. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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  valuefor 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()onsupplier, 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. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
| static <A,B> Converter<A,B> | Converter. from(Function<? super A,? extends B> forwardFunction,
        Function<? super B,? extends A> backwardFunction)Returns a converter based on existing forward and backward functions. | 
| static <A,B> Converter<A,B> | Converter. from(Function<? super A,? extends B> forwardFunction,
        Function<? super B,? extends A> backwardFunction)Returns a converter based on existing forward and backward functions. | 
| <F> Equivalence<F> | Equivalence. onResultOf(Function<F,? extends T> function)Returns a new equivalence relation for  Fwhich evaluates equivalence by first applyingfunctionto the argument, then evaluating usingthis. | 
| abstract <V> Optional<V> | Optional. transform(Function<? super T,V> function)If the instance is present, it is transformed with the given  Function; otherwise,Optional.absent()is returned. | 
| Modifier and Type | Interface and Description | 
|---|---|
| interface  | LoadingCache<K,V>A semi-persistent mapping from keys to values. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | AbstractLoadingCache<K,V>This class provides a skeletal implementation of the  Cacheinterface to minimize the
 effort required to implement this interface. | 
| class  | ForwardingLoadingCache<K,V>A cache which forwards all its method calls to another cache. | 
| static class  | ForwardingLoadingCache.SimpleForwardingLoadingCache<K,V>A simplified version of  ForwardingLoadingCachewhere subclasses can pass in an already
 constructedLoadingCacheas the delegate. | 
| Modifier and Type | Method and Description | 
|---|---|
| static <K,V> CacheLoader<K,V> | CacheLoader. from(Function<K,V> function)Returns a cache loader based on an existing function instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
| Modifier and Type | Method and Description | 
|---|---|
| static <K,V> NavigableMap<K,V> | Maps. asMap(NavigableSet<K> set,
          Function<? super K,V> function)Returns a view of the navigable set as a map, mapping keys from the set
 according to the specified function. | 
| static <K,V> Map<K,V> | Maps. asMap(Set<K> set,
          Function<? super K,V> function)Returns a live  Mapview whose keys are the contents ofsetand whose values are computed on demand usingfunction. | 
| static <K,V> SortedMap<K,V> | Maps. asMap(SortedSet<K> set,
          Function<? super K,V> function)Returns a view of the sorted set as a map, mapping keys from the set
 according to the specified function. | 
| <K> ImmutableListMultimap<K,E> | FluentIterable. index(Function<? super E,K> keyFunction)Creates an index  ImmutableListMultimapthat contains the results of applying a
 specified function to each item in thisFluentIterableof values. | 
| static <K,V> ImmutableListMultimap<K,V> | 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. | 
| static <K,V> ImmutableListMultimap<K,V> | Multimaps. index(Iterator<V> values,
          Function<? super V,K> keyFunction)Creates an index  ImmutableListMultimapthat contains the results of
 applying a specified function to each item in anIteratorof
 values. | 
| <F> Ordering<F> | 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. | 
| <V> ImmutableMap<E,V> | FluentIterable. toMap(Function<? super E,V> valueFunction)Returns an immutable map whose keys are the distinct elements of this  FluentIterableand whose value for each key was computed byvalueFunction. | 
| static <K,V> ImmutableMap<K,V> | Maps. toMap(Iterable<K> keys,
          Function<? super K,V> valueFunction)Returns an immutable map whose keys are the distinct elements of  keysand whose value for each key was computed byvalueFunction. | 
| static <K,V> ImmutableMap<K,V> | Maps. toMap(Iterator<K> keys,
          Function<? super K,V> valueFunction)Returns an immutable map whose keys are the distinct elements of  keysand whose value for each key was computed byvalueFunction. | 
| static <F,T> Collection<T> | Collections2. transform(Collection<F> fromCollection,
                  Function<? super F,T> function)Returns a collection that applies  functionto each element offromCollection. | 
| <T> FluentIterable<T> | FluentIterable. transform(Function<? super E,T> function)Returns a fluent iterable that applies  functionto each element of this
 fluent iterable. | 
| static <F,T> Iterable<T> | Iterables. transform(Iterable<F> fromIterable,
                  Function<? super F,? extends T> function)Returns an iterable that applies  functionto each element offromIterable. | 
| static <F,T> Iterator<T> | Iterators. transform(Iterator<F> fromIterator,
                  Function<? super F,? extends T> function)Returns an iterator that applies  functionto each element offromIterator. | 
| static <F,T> List<T> | Lists. transform(List<F> fromList,
                  Function<? super F,? extends T> function)Returns a list that applies  functionto each element offromList. | 
| <T> FluentIterable<T> | FluentIterable. transformAndConcat(Function<? super E,? extends Iterable<? extends T>> function)Applies  functionto each element of this fluent iterable and returns
 a fluent iterable with the concatenated combination of results. | 
| static <K,V1,V2> ListMultimap<K,V2> | 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 <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> NavigableMap<K,V2> | Maps. transformValues(NavigableMap<K,V1> fromMap,
                              Function<? super V1,V2> function)Returns a view of a navigable map where each value is transformed by a
 function. | 
| static <K,V1,V2> SortedMap<K,V2> | Maps. 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>  | 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. | 
| <K> ImmutableMap<K,E> | FluentIterable. uniqueIndex(Function<? super E,K> keyFunction)Returns a map with the contents of this  FluentIterableas itsvalues, indexed
 by keys derived from those values. | 
| static <K,V> ImmutableMap<K,V> | Maps. uniqueIndex(Iterable<V> values,
                      Function<? super V,K> keyFunction)Returns a map with the given  values, indexed by keys derived from
 those values. | 
| static <K,V> ImmutableMap<K,V> | Maps. uniqueIndex(Iterator<V> values,
                      Function<? super V,K> keyFunction)Returns a map with the given  values, indexed by keys derived from
 those values. | 
| Modifier and Type | Method and Description | 
|---|---|
| Function<String,String> | Escaper. asFunction()Returns a  Functionthat invokesEscaper.escape(String)on this escaper. | 
| Modifier and Type | Method and Description | 
|---|---|
| static <V,X extends Throwable>  | Futures. catching(ListenableFuture<? extends V> input,
                Class<X> exceptionType,
                Function<? super X,? extends V> fallback)Returns a  Futurewhose result is taken from the given primaryinputor, if the
 primary input fails with the givenexceptionType, from the result provided by thefallback. | 
| static <V,X extends Throwable>  | Futures. catching(ListenableFuture<? extends V> input,
                Class<X> exceptionType,
                Function<? super X,? extends V> fallback,
                Executor executor)Returns a  Futurewhose result is taken from the given primaryinputor, if the
 primary input fails with the givenexceptionType, from the result provided by thefallback. | 
| static <I,O> Future<O> | Futures. lazyTransform(Future<I> input,
                          Function<? super I,? extends O> function)Like  Futures.transform(ListenableFuture, Function)except that the
 transformationfunctionis invoked on each call toget()on the returned future. | 
| static <V,X extends Exception>  | Futures. makeChecked(ListenableFuture<V> future,
                      Function<? super Exception,X> mapper)Creates a  CheckedFutureout of a normalListenableFutureand aFunctionthat maps fromExceptioninstances into the appropriate checked type. | 
| static <I,O> ListenableFuture<O> | Futures. transform(ListenableFuture<I> input,
                  Function<? super I,? extends O> function)Returns a new  ListenableFuturewhose result is the product of
 applying the givenFunctionto the result of the givenFuture. | 
| static <I,O> ListenableFuture<O> | Futures. transform(ListenableFuture<I> input,
                  Function<? super I,? extends O> function,
                  Executor executor)Returns a new  ListenableFuturewhose result is the product of
 applying the givenFunctionto the result of the givenFuture. | 
Copyright © 2010-2015. All Rights Reserved.