|
||||||||||
| 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
See Functions.toStringFunction(). |
static Function<java.lang.String,java.lang.String> |
Functions.TRIM_STRING
See Functions.trimString(). |
| 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)
Returns a Function that returns value for any input. |
|
static
|
Functions.forMap(java.util.Map<? super A,? extends B> map)
Returns a function which performs key-to-value lookup on map. |
|
static
|
Functions.forMap(java.util.Map<? super A,? extends B> map,
B defaultValue)
Returns a function which performs key-to-value lookup on map. |
|
static
|
Functions.forPredicate(Predicate<? super T> predicate)
Returns a boolean-valued function that evaluates to the same result as the given predicate. |
|
static
|
Functions.identity()
Returns the identity function. |
|
static Function<java.lang.Object,java.lang.Integer> |
Functions.toHashCode()
Returns a function that determines the Object.hashCode() of its
argument. |
|
static
|
Functions.toStringFunction()
Returns a function that returns the Object.toString() value of its
argument. |
|
static Function<java.lang.String,java.lang.String> |
Functions.trimString()
A function that returns the result of calling String.trim()
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<K,V> function,
Supplier<? extends K> first)
Returns a new Supplier which is the composition of the Function function and the Supplier first. |
|
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 | ||
|---|---|---|
static
|
Comparators.fromFunction(Function<F,T> function)
Creates a comparator that compares any two items by applying a function to each of them and using the natural ordering of the results. |
|
static
|
Comparators.fromFunction(Function<F,T> function,
java.util.Comparator<? super T> comparator)
Creates a comparator that compares any two items by applying a function to each of them and using the supplied comparator to compare the results. |
|
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. |
|
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.uniqueIndex(java.util.Collection<? extends V> values,
Function<? super V,? extends K> keyFunction)
Creates an index Map that contains the results of applying a
specified function to each item in a Collection of values. |
|
static
|
Maps.uniqueIndex(java.lang.Iterable<? extends V> values,
Function<? super V,? extends K> keyFunction)
Creates an index Map that contains the results of applying a
specified function to each item in an Iterable of values. |
|
static
|
Maps.uniqueIndex(java.util.Iterator<? extends V> values,
Function<? super V,? extends K> keyFunction)
Creates an index Map that contains the results of applying a
specified function to each item in an Iterator of values. |
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||