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.
|
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Suppliers.ExpiringMemoizingSupplier<T> |
(package private) static class |
Suppliers.MemoizingSupplier<T> |
private static class |
Suppliers.SupplierComposition<F,T> |
private static class |
Suppliers.SupplierOfInstance<T> |
private static class |
Suppliers.ThreadSafeSupplier<T> |
Modifier and Type | Field and Description |
---|---|
(package private) Supplier<T> |
Suppliers.MemoizingSupplier.delegate |
(package private) Supplier<T> |
Suppliers.ExpiringMemoizingSupplier.delegate |
(package private) Supplier<T> |
Suppliers.ThreadSafeSupplier.delegate |
private Supplier<T> |
Functions.SupplierFunction.supplier |
(package private) Supplier<F> |
Suppliers.SupplierComposition.supplier |
Modifier and Type | Method and 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 to
get()
and returns that value on subsequent calls to get() . |
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 supplies
instance . |
static <T> Supplier<T> |
Suppliers.synchronizedSupplier(Supplier<T> delegate)
Returns a supplier whose
get() method synchronizes on delegate before calling
it, making it thread-safe. |
Modifier and Type | Method and Description |
---|---|
static <T> Function<Supplier<T>,T> |
Suppliers.supplierFunction()
Returns a function that accepts a supplier and returns the result of invoking
get() on that supplier. |
Modifier and Type | Method and 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 <T> Function<java.lang.Object,T> |
Functions.forSupplier(Supplier<T> supplier)
Returns a function that ignores its input and returns the result of
supplier.get() . |
static <T> 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> 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.
|
abstract T |
Optional.or(Supplier<? extends T> supplier)
Returns the contained instance if it is present;
supplier.get() otherwise. |
T |
Absent.or(Supplier<? extends T> supplier) |
T |
Present.or(Supplier<? extends T> supplier) |
static <T> Supplier<T> |
Suppliers.synchronizedSupplier(Supplier<T> delegate)
Returns a supplier whose
get() method synchronizes on delegate before calling
it, making it thread-safe. |
Constructor and Description |
---|
ExpiringMemoizingSupplier(Supplier<T> delegate,
long duration,
java.util.concurrent.TimeUnit unit) |
MemoizingSupplier(Supplier<T> delegate) |
SupplierComposition(Function<? super F,T> function,
Supplier<F> supplier) |
SupplierFunction(Supplier<T> supplier) |
ThreadSafeSupplier(Supplier<T> delegate) |
Modifier and Type | Field and 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 |
Modifier and Type | Method and Description |
---|---|
(package private) Supplier<? extends AbstractCache.StatsCounter> |
CacheBuilder.getStatsCounterSupplier() |
Modifier and Type | Method and Description |
---|---|
static <V> CacheLoader<java.lang.Object,V> |
CacheLoader.from(Supplier<V> supplier)
Returns a cache loader based on an existing supplier instance.
|
Constructor and Description |
---|
SupplierToCacheLoader(Supplier<V> computingSupplier) |
Modifier and Type | Class and 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> |
Modifier and Type | Field and Description |
---|---|
(package private) Supplier<? extends java.util.Map<C,V>> |
StandardTable.factory |
(package private) Supplier<? extends java.util.Collection<V>> |
Multimaps.CustomMultimap.factory |
(package private) Supplier<? extends java.util.List<V>> |
Multimaps.CustomListMultimap.factory |
(package private) Supplier<? extends java.util.Set<V>> |
Multimaps.CustomSetMultimap.factory |
(package private) Supplier<? extends java.util.SortedSet<V>> |
Multimaps.CustomSortedSetMultimap.factory |
Modifier and Type | Method and Description |
---|---|
static <V> Supplier<java.util.List<V>> |
MultimapBuilder.LinkedListSupplier.instance() |
Modifier and Type | Method and 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 new
ListMultimap 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 new
Multimap backed by map , whose internal value
collections are generated by factory . |
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 new
SetMultimap 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 new
SortedSetMultimap that uses the provided map and
factory. |
Constructor and 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) |
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Hashing.ChecksumType |
Modifier and Type | Field and Description |
---|---|
private Supplier<? extends java.util.zip.Checksum> |
ChecksumHashFunction.checksumSupplier |
Constructor and Description |
---|
ChecksumHashFunction(Supplier<? extends java.util.zip.Checksum> checksumSupplier,
int bits,
java.lang.String toString) |
Modifier and Type | Class and Description |
---|---|
private class |
AbstractIdleService.ThreadNameSupplier |
Modifier and Type | Field and Description |
---|---|
private static Supplier<java.util.concurrent.locks.ReadWriteLock> |
Striped.READ_WRITE_LOCK_SUPPLIER |
(package private) Supplier<L> |
Striped.SmallLazyStriped.supplier |
(package private) Supplier<L> |
Striped.LargeLazyStriped.supplier |
private Supplier<java.lang.String> |
AbstractIdleService.threadNameSupplier |
Modifier and Type | Method and Description |
---|---|
private static <L> Striped<L> |
Striped.lazy(int stripes,
Supplier<L> supplier) |
(package private) static java.util.concurrent.ExecutorService |
MoreExecutors.renamingDecorator(java.util.concurrent.ExecutorService service,
Supplier<java.lang.String> nameSupplier)
Creates an
ExecutorService that renames the threads that its tasks run
in. |
(package private) static java.util.concurrent.Executor |
MoreExecutors.renamingDecorator(java.util.concurrent.Executor executor,
Supplier<java.lang.String> nameSupplier)
Creates an
Executor that renames the threads 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 a
ScheduledExecutorService that renames the threads that its
tasks run in. |
(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 of
Callable.call() the thread that is
running will have the given name. |
(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 of
Runnable.run() the thread that is
running with have the given name. |
Constructor and Description |
---|
CompactStriped(int stripes,
Supplier<L> supplier) |
LargeLazyStriped(int stripes,
Supplier<L> supplier) |
SmallLazyStriped(int stripes,
Supplier<L> supplier) |