Uses of Interface
com.google.common.base.Supplier
-
Packages that use Supplier 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.hash Hash functions and related structures.com.google.common.util.concurrent Concurrency utilities. -
-
Uses of Supplier in com.google.common.base
Classes in com.google.common.base that implement Supplier Modifier and Type Class Description (package private) static class
Suppliers.ExpiringMemoizingSupplier<T>
(package private) static class
Suppliers.MemoizingSupplier<T>
(package private) static class
Suppliers.NonSerializableMemoizingSupplier<T>
private static class
Suppliers.SupplierComposition<F,T>
private static class
Suppliers.SupplierOfInstance<T>
private static class
Suppliers.ThreadSafeSupplier<T>
Fields in com.google.common.base declared as Supplier Modifier and Type Field Description (package private) Supplier<T>
Suppliers.ExpiringMemoizingSupplier. delegate
(package private) Supplier<T>
Suppliers.MemoizingSupplier. delegate
(package private) Supplier<T>
Suppliers.NonSerializableMemoizingSupplier. delegate
(package private) Supplier<T>
Suppliers.ThreadSafeSupplier. delegate
private Supplier<T>
Functions.SupplierFunction. supplier
(package private) Supplier<F>
Suppliers.SupplierComposition. supplier
Methods in com.google.common.base that return Supplier Modifier and Type Method 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 <T> Supplier<T>
Suppliers. memoize(Supplier<T> delegate)
Returns a supplier which caches the instance retrieved during the first call toget()
and returns that value on subsequent calls toget()
.static <T> Supplier<T>
Suppliers. memoizeWithExpiration(Supplier<T> delegate, long duration, java.util.concurrent.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> Supplier<T>
Suppliers. ofInstance(T instance)
Returns a supplier that always suppliesinstance
.static <T> Supplier<T>
Suppliers. synchronizedSupplier(Supplier<T> delegate)
Returns a supplier whoseget()
method synchronizes ondelegate
before calling it, making it thread-safe.Methods in com.google.common.base that return types with arguments of type Supplier Modifier and Type Method Description static <T> Function<Supplier<T>,T>
Suppliers. supplierFunction()
Returns a function that accepts a supplier and returns the result of invokingget()
on that supplier.Methods in com.google.common.base with parameters of type Supplier Modifier and Type Method Description java.lang.Object
Suppliers.SupplierFunctionImpl. apply(Supplier<java.lang.Object> input)
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 <F,T>
Function<F,T>Functions. forSupplier(Supplier<T> supplier)
Returns a function that ignores its input and returns the result ofsupplier.get()
.static <T> Supplier<T>
Suppliers. memoize(Supplier<T> delegate)
Returns a supplier which caches the instance retrieved during the first call toget()
and returns that value on subsequent calls toget()
.static <T> Supplier<T>
Suppliers. memoizeWithExpiration(Supplier<T> delegate, long duration, java.util.concurrent.TimeUnit unit)
Returns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed.T
Absent. or(Supplier<? extends T> supplier)
abstract T
Optional. or(Supplier<? extends T> supplier)
Returns the contained instance if it is present;supplier.get()
otherwise.T
Present. or(Supplier<? extends T> supplier)
static <T> Supplier<T>
Suppliers. synchronizedSupplier(Supplier<T> delegate)
Returns a supplier whoseget()
method synchronizes ondelegate
before calling it, making it thread-safe.Constructors in com.google.common.base with parameters of type Supplier Constructor Description ExpiringMemoizingSupplier(Supplier<T> delegate, long duration, java.util.concurrent.TimeUnit unit)
MemoizingSupplier(Supplier<T> delegate)
NonSerializableMemoizingSupplier(Supplier<T> delegate)
SupplierComposition(Function<? super F,T> function, Supplier<F> supplier)
SupplierFunction(Supplier<T> supplier)
ThreadSafeSupplier(Supplier<T> delegate)
-
Uses of Supplier in com.google.common.cache
Fields in com.google.common.cache declared as Supplier Modifier and Type Field Description (package private) static Supplier<AbstractCache.StatsCounter>
CacheBuilder. CACHE_STATS_COUNTER
private Supplier<V>
CacheLoader.SupplierToCacheLoader. computingSupplier
(package private) static Supplier<? extends AbstractCache.StatsCounter>
CacheBuilder. NULL_STATS_COUNTER
(package private) Supplier<? extends AbstractCache.StatsCounter>
CacheBuilder. statsCounterSupplier
private static Supplier<LongAddable>
LongAddables. SUPPLIER
Methods in com.google.common.cache that return Supplier Modifier and Type Method Description (package private) Supplier<? extends AbstractCache.StatsCounter>
CacheBuilder. getStatsCounterSupplier()
Methods in com.google.common.cache with parameters of type Supplier Modifier and Type Method Description static <V> CacheLoader<java.lang.Object,V>
CacheLoader. from(Supplier<V> supplier)
Returns a cache loader based on an existing supplier instance.Constructors in com.google.common.cache with parameters of type Supplier Constructor Description SupplierToCacheLoader(Supplier<V> computingSupplier)
-
Uses of Supplier in com.google.common.collect
Classes in com.google.common.collect that implement Supplier Modifier and Type Class Description private static class
HashBasedTable.Factory<C,V>
private static class
MultimapBuilder.ArrayListSupplier<V>
private static class
MultimapBuilder.EnumSetSupplier<V extends java.lang.Enum<V>>
private static class
MultimapBuilder.HashSetSupplier<V>
private static class
MultimapBuilder.LinkedHashSetSupplier<V>
private static class
MultimapBuilder.LinkedListSupplier
private static class
MultimapBuilder.TreeSetSupplier<V>
private static class
TreeBasedTable.Factory<C,V>
Fields in com.google.common.collect declared as Supplier Modifier and Type Field Description (package private) Supplier<? extends java.util.List<V>>
Multimaps.CustomListMultimap. factory
(package private) Supplier<? extends java.util.Collection<V>>
Multimaps.CustomMultimap. factory
(package private) Supplier<? extends java.util.Set<V>>
Multimaps.CustomSetMultimap. factory
(package private) Supplier<? extends java.util.SortedSet<V>>
Multimaps.CustomSortedSetMultimap. factory
(package private) Supplier<? extends java.util.Map<C,V>>
StandardTable. factory
Methods in com.google.common.collect that return Supplier Modifier and Type Method Description static <V> Supplier<java.util.List<V>>
MultimapBuilder.LinkedListSupplier. instance()
Methods in com.google.common.collect with parameters of type Supplier Modifier and Type Method Description static <R,C,V>
Table<R,C,V>Tables. newCustomTable(java.util.Map<R,java.util.Map<C,V>> backingMap, Supplier<? extends java.util.Map<C,V>> factory)
Creates a table that uses the specified backing map and factory.static <K,V>
ListMultimap<K,V>Multimaps. newListMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.List<V>> factory)
Creates a newListMultimap
that uses the provided map and factory.static <K,V>
Multimap<K,V>Multimaps. newMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.Collection<V>> factory)
Creates a newMultimap
backed bymap
, whose internal value collections are generated byfactory
.static <K,V>
SetMultimap<K,V>Multimaps. newSetMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.Set<V>> factory)
Creates a newSetMultimap
that uses the provided map and factory.static <K,V>
SortedSetMultimap<K,V>Multimaps. newSortedSetMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.SortedSet<V>> factory)
Creates a newSortedSetMultimap
that uses the provided map and factory.Constructors in com.google.common.collect with parameters of type Supplier Constructor Description CustomListMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.List<V>> factory)
CustomMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.Collection<V>> factory)
CustomSetMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.Set<V>> factory)
CustomSortedSetMultimap(java.util.Map<K,java.util.Collection<V>> map, Supplier<? extends java.util.SortedSet<V>> factory)
StandardRowSortedTable(java.util.SortedMap<R,java.util.Map<C,V>> backingMap, Supplier<? extends java.util.Map<C,V>> factory)
StandardTable(java.util.Map<R,java.util.Map<C,V>> backingMap, Supplier<? extends java.util.Map<C,V>> factory)
-
Uses of Supplier in com.google.common.hash
Subinterfaces of Supplier in com.google.common.hash Modifier and Type Interface Description (package private) interface
ImmutableSupplier<T>
Explicitly named subinterface ofSupplier
that can be marked @Immutable
.Classes in com.google.common.hash that implement Supplier Modifier and Type Class Description (package private) static class
Hashing.ChecksumType
Fields in com.google.common.hash declared as Supplier Modifier and Type Field Description private static Supplier<LongAddable>
LongAddables. SUPPLIER
-
Uses of Supplier in com.google.common.util.concurrent
Classes in com.google.common.util.concurrent that implement Supplier Modifier and Type Class Description private class
AbstractIdleService.ThreadNameSupplier
Fields in com.google.common.util.concurrent declared as Supplier Modifier and Type Field Description private static Supplier<java.util.concurrent.locks.ReadWriteLock>
Striped. READ_WRITE_LOCK_SUPPLIER
(package private) Supplier<L>
Striped.LargeLazyStriped. supplier
(package private) Supplier<L>
Striped.SmallLazyStriped. supplier
private Supplier<java.lang.String>
AbstractIdleService. threadNameSupplier
private static Supplier<java.util.concurrent.locks.ReadWriteLock>
Striped. WEAK_SAFE_READ_WRITE_LOCK_SUPPLIER
Methods in com.google.common.util.concurrent with parameters of type Supplier Modifier and Type Method Description (package private) static <L> Striped<L>
Striped. custom(int stripes, Supplier<L> supplier)
Creates aStriped<L>
with eagerly initialized, strongly referenced locks.private static <L> Striped<L>
Striped. lazy(int stripes, Supplier<L> supplier)
(package private) static java.util.concurrent.Executor
MoreExecutors. renamingDecorator(java.util.concurrent.Executor executor, Supplier<java.lang.String> nameSupplier)
Creates anExecutor
that renames thethreads
that its tasks run in.(package private) static java.util.concurrent.ExecutorService
MoreExecutors. renamingDecorator(java.util.concurrent.ExecutorService service, Supplier<java.lang.String> nameSupplier)
Creates anExecutorService
that renames thethreads
that its tasks run in.(package private) static java.util.concurrent.ScheduledExecutorService
MoreExecutors. renamingDecorator(java.util.concurrent.ScheduledExecutorService service, Supplier<java.lang.String> nameSupplier)
Creates aScheduledExecutorService
that renames thethreads
that its tasks run in.(package private) static java.lang.Runnable
Callables. threadRenaming(java.lang.Runnable task, Supplier<java.lang.String> nameSupplier)
Wraps the given runnable such that for the duration ofRunnable.run()
the thread that is running with have the given name.(package private) static <T> java.util.concurrent.Callable<T>
Callables. threadRenaming(java.util.concurrent.Callable<T> callable, Supplier<java.lang.String> nameSupplier)
Wraps the given callable such that for the duration ofCallable.call()
the thread that is running will have the given name.Constructors in com.google.common.util.concurrent with parameters of type Supplier Constructor Description CompactStriped(int stripes, Supplier<L> supplier)
LargeLazyStriped(int stripes, Supplier<L> supplier)
SmallLazyStriped(int stripes, Supplier<L> supplier)
-