Uses of Interface
dev.mccue.guava.base.Function

  • Uses of Function in dev.mccue.guava.base

    Classes in dev.mccue.guava.base that implement Function
    Modifier and Type
    Class
    Description
    class 
    A function from A to B with an associated reverse function from B to A; used for converting back and forth between different representations of the same information.
    Methods in dev.mccue.guava.base that return Function
    Modifier and Type
    Method
    Description
    static <A extends @Nullable Object, B extends @Nullable Object, C extends @Nullable Object>
    Function<A,C>
    Functions.compose(Function<B,C> g, Function<A,? extends B> f)
    Returns the composition of two functions.
    static <E extends @Nullable Object>
    Function<@Nullable Object,E>
    Functions.constant(E value)
    Returns a function that ignores its input and always returns value.
    static <K extends @Nullable Object, V extends @Nullable Object>
    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 extends @Nullable Object, V extends @Nullable Object>
    Function<K,V>
    Functions.forMap(Map<K,V> map)
    Returns a function which performs a map lookup.
    static <T extends @Nullable Object>
    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 <F extends @Nullable Object, T extends @Nullable Object>
    Function<F,T>
    Functions.forSupplier(Supplier<T> supplier)
    Returns a function that ignores its input and returns the result of supplier.get().
    static <E extends @Nullable Object>
    Function<E,E>
    Functions.identity()
    Returns the identity function.
    static <T extends @Nullable Object>
    Function<Supplier<T>,T>
    Suppliers.supplierFunction()
    Returns a function that accepts a supplier and returns the result of invoking Supplier#get on that supplier.
    Functions.toStringFunction()
    A function equivalent to the method reference Object::toString, for users not yet using Java 8.
    Methods in dev.mccue.guava.base with parameters of type Function
    Modifier and Type
    Method
    Description
    static <A extends @Nullable Object, B extends @Nullable Object, C extends @Nullable Object>
    Function<A,C>
    Functions.compose(Function<B,C> g, Function<A,? extends B> f)
    Returns the composition of two functions.
    static <A extends @Nullable Object, B extends @Nullable Object>
    Predicate<A>
    Predicates.compose(Predicate<B> predicate, Function<A,? extends B> function)
    Returns the composition of a function and a predicate.
    static <F extends @Nullable Object, T extends @Nullable Object>
    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> Converter<A,B>
    Converter.from(Function<? super A,? extends B> forwardFunction, Function<? super B,? extends A> backwardFunction)
    Returns a converter based on separate forward and backward functions.
    final <F> Equivalence<F>
    Equivalence.onResultOf(Function<? super F,? extends @Nullable T> function)
    Returns a new equivalence relation for F which evaluates equivalence by first applying function to the argument, then evaluating using this.
    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.