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

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

    Methods in dev.mccue.guava.base that return Supplier
    Modifier and Type
    Method
    Description
    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 <T extends @Nullable Object>
    Supplier<T>
    Suppliers.memoize(Supplier<T> delegate)
    Returns a supplier which caches the instance retrieved during the first call to get() and returns that value on subsequent calls to get().
    static <T extends @Nullable Object>
    Supplier<T>
    Suppliers.memoizeWithExpiration(Supplier<T> delegate, long duration, TimeUnit unit)
    Returns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed.
    static <T extends @Nullable Object>
    Supplier<T>
    Suppliers.ofInstance(T instance)
    Returns a supplier that always supplies instance.
    static <T extends @Nullable Object>
    Supplier<T>
    Suppliers.synchronizedSupplier(Supplier<T> delegate)
    Returns a supplier whose get() method synchronizes on delegate before calling it, making it thread-safe.
    Methods in dev.mccue.guava.base that return types with arguments of type Supplier
    Modifier and Type
    Method
    Description
    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.
    Methods in dev.mccue.guava.base with parameters of type Supplier
    Modifier and Type
    Method
    Description
    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 <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 <T extends @Nullable Object>
    Supplier<T>
    Suppliers.memoize(Supplier<T> delegate)
    Returns a supplier which caches the instance retrieved during the first call to get() and returns that value on subsequent calls to get().
    static <T extends @Nullable Object>
    Supplier<T>
    Suppliers.memoizeWithExpiration(Supplier<T> delegate, long duration, TimeUnit unit)
    Returns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed.
    abstract T
    Optional.or(Supplier<? extends T> supplier)
    Returns the contained instance if it is present; supplier.get() otherwise.
    static <T extends @Nullable Object>
    Supplier<T>
    Suppliers.synchronizedSupplier(Supplier<T> delegate)
    Returns a supplier whose get() method synchronizes on delegate before calling it, making it thread-safe.