|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| Packages that use Function | |
|---|---|
| com.google.common.base | Miscellaneous common util classes and annotations. |
| com.google.common.collect | This package contains generic collection interfaces and implementations, and other utilities for working with collections. |
| Uses of Function in com.google.common.base |
|---|
| Fields in com.google.common.base declared as Function | |
|---|---|
static Function<java.lang.Object,java.lang.String> |
Functions.TO_STRING
A function that calls toString() on its argument. |
| Methods in com.google.common.base that return Function | ||
|---|---|---|
static
|
Functions.compose(Function<? super B,? extends C> g,
Function<? super A,? extends B> f)
Returns the composition of two functions. |
|
static
|
Functions.constant(E value)
Creates a function that returns value for any input. |
|
static
|
Functions.forMap(java.util.Map<? super A,? extends B> map)
Returns a function which performs a map lookup. |
|
static
|
Functions.forMap(java.util.Map<? super A,? extends B> map,
B defaultValue)
Returns a function which performs a map lookup with a default value. |
|
static
|
Functions.forPredicate(Predicate<? super 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 Function<java.lang.Object,java.lang.Integer> |
Functions.toHashCode()
Returns a function that determines the hash code of its argument. |
|
static
|
Functions.toStringFunction()
Returns a function that calls toString() on its argument. |
|
| Methods in com.google.common.base with parameters of type Function | ||
|---|---|---|
static
|
Functions.compose(Function<? super B,? extends C> g,
Function<? super A,? extends B> f)
Returns the composition of two functions. |
|
static
|
Functions.compose(Function<? super B,? extends C> g,
Function<? super A,? extends B> f)
Returns the composition of two functions. |
|
static
|
Suppliers.compose(Function<? super F,? extends T> function,
Supplier<? extends F> first)
Returns a new supplier which is the composition of the provided function and supplier. |
|
static
|
Predicates.compose(Predicate<? super B> predicate,
Function<? super 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 with parameters of type Function | ||
|---|---|---|
|
CustomConcurrentHashMap.Builder.buildComputingMap(CustomConcurrentHashMap.ComputingStrategy<K,V,E> strategy,
Function<? super K,? extends V> computer)
Creates a ConcurrentMap, backed by the given strategy, that
supports atomic, on-demand computation of values. |
|
V |
CustomConcurrentHashMap.ComputingStrategy.compute(K key,
E entry,
Function<? super K,? extends V> computer)
Computes a value for the given key and stores it in the given entry. |
|
static
|
Multimaps.index(java.lang.Iterable<? extends V> values,
Function<? super V,? extends K> keyFunction)
Creates an index ListMultimap that contains the results of applying
a specified function to each item in an Iterable of values. |
|
static
|
Multimaps.index(java.lang.Iterable<? extends V> values,
Function<? super V,? extends K> keyFunction,
Multimap<K,V> multimap)
Indexes the specified values into a Multimap by applying a
specified function to each item in an Iterable of values. |
|
|
MapMaker.makeComputingMap(Function<? super K,? extends V> computer)
See CustomConcurrentHashMap.Builder.buildComputingMap(
CustomConcurrentHashMap.ComputingStrategy,
com.google.common.base.Function). |
|
|
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
|
Iterables.transform(java.lang.Iterable<F> fromIterable,
Function<? super F,? extends T> function)
Returns an iterable that applies function to each element of fromIterable. |
|
static
|
Iterators.transform(java.util.Iterator<F> fromIterator,
Function<? super F,? extends T> function)
Returns an iterator that applies function to each element of fromIterator. |
|
static
|
Lists.transform(java.util.List<F> fromList,
Function<? super F,? extends T> function)
Returns a list that applies function to each element of fromList. |
|
static
|
Maps.transformValues(java.util.Map<K,V1> fromMap,
Function<? super V1,V2> function)
Returns a view of a map where each value is transformed by a function. |
|
static
|
Maps.uniqueIndex(java.lang.Iterable<? extends 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. |
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||