| Modifier and Type | Class and Description |
|---|---|
static class |
Splitter.MapSplitter
An object that splits strings into maps as
Splitter splits
iterables and lists. |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
Splitter.splitToList(CharSequence sequence)
Splits
sequence into string components and returns them as
an immutable list. |
static <T> Function<Supplier<T>,T> |
Suppliers.supplierFunction()
Returns a function that accepts a supplier and returns the result of
invoking
Supplier.get() on that supplier. |
Splitter.MapSplitter |
Splitter.withKeyValueSeparator(char separator)
Returns a
MapSplitter which splits entries based on this splitter,
and splits entries into keys and values using the specified separator. |
Splitter.MapSplitter |
Splitter.withKeyValueSeparator(Splitter keyValueSplitter)
Returns a
MapSplitter which splits entries based on this splitter,
and splits entries into keys and values using the specified key-value
splitter. |
Splitter.MapSplitter |
Splitter.withKeyValueSeparator(String separator)
Returns a
MapSplitter which splits entries based on this splitter,
and splits entries into keys and values using the specified separator. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractCache<K,V>
This class provides a skeletal implementation of the
Cache interface to minimize the
effort required to implement this interface. |
static class |
AbstractCache.SimpleStatsCounter
A thread-safe
AbstractCache.StatsCounter implementation for use by Cache implementors. |
static interface |
AbstractCache.StatsCounter
Accumulates statistics during the operation of a
Cache for presentation by Cache.stats(). |
interface |
Cache<K,V>
A semi-persistent mapping from keys to values.
|
class |
CacheBuilderSpec
A specification of a
CacheBuilder configuration. |
class |
CacheStats
Statistics about the performance of a
Cache. |
class |
ForwardingCache<K,V>
A cache which forwards all its method calls to another cache.
|
static class |
ForwardingCache.SimpleForwardingCache<K,V>
A simplified version of
ForwardingCache where subclasses can pass in an already
constructed Cache as the delegete. |
interface |
LoadingCache<K,V>
A semi-persistent mapping from keys to values.
|
class |
RemovalCause
The reason why a cached entry was removed.
|
interface |
RemovalListener<K,V>
An object that can receive a notification when an entry is removed from a cache.
|
class |
RemovalNotification<K,V>
A notification of the removal of a single entry.
|
interface |
Weigher<K,V>
Calculates the weights of cache entries.
|
| Modifier and Type | Method and Description |
|---|---|
static CacheBuilder<Object,Object> |
CacheBuilder.from(CacheBuilderSpec spec)
Constructs a new
CacheBuilder instance with the settings specified in spec. |
static <K,V> CacheLoader<K,V> |
CacheLoader.from(Function<K,V> function)
Returns a cache loader based on an existing function instance.
|
static CacheBuilder<Object,Object> |
CacheBuilder.from(String spec)
Constructs a new
CacheBuilder instance with the settings specified in spec. |
static <V> CacheLoader<Object,V> |
CacheLoader.from(Supplier<V> supplier)
Returns a cache loader based on an existing supplier instance.
|
CacheBuilder<K,V> |
CacheBuilder.refreshAfterWrite(long duration,
TimeUnit unit)
Specifies that active entries are eligible for automatic refresh once a fixed duration has
elapsed after the entry's creation, or the most recent replacement of its value.
|
| Modifier and Type | Class and Description |
|---|---|
class |
TreeTraverser<T>
Views elements of a type
T as nodes in a tree, and provides methods to traverse the trees
induced by this traverser. |
| Modifier and Type | Method and Description |
|---|---|
static <E> int |
Queues.drain(BlockingQueue<E> q,
Collection<? super E> buffer,
int numElements,
long timeout,
TimeUnit unit)
Drains the queue as
BlockingQueue.drainTo(Collection, int), but if the requested
numElements elements are not available, it will wait for them up to the specified
timeout. |
static <E> int |
Queues.drainUninterruptibly(BlockingQueue<E> q,
Collection<? super E> buffer,
int numElements,
long timeout,
TimeUnit unit)
Drains the queue as Queues.drain(BlockingQueue, Collection, int, long, TimeUnit),
but with a different behavior in case it is interrupted while waiting.
|
static <E> Deque<E> |
Queues.synchronizedDeque(Deque<E> deque)
Returns a synchronized (thread-safe) deque backed by the specified deque.
|
static <E> Queue<E> |
Queues.synchronizedQueue(Queue<E> queue)
Returns a synchronized (thread-safe) queue backed by the specified queue.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractCheckedFuture<V,X extends Exception>
A delegating wrapper around a
ListenableFuture that adds support for
the AbstractCheckedFuture.checkedGet() and AbstractCheckedFuture.checkedGet(long, TimeUnit) methods. |
class |
AbstractListeningExecutorService
Abstract
ListeningExecutorService implementation that creates
ListenableFutureTask instances for each Runnable and Callable submitted
to it. |
interface |
CheckedFuture<V,X extends Exception>
A
CheckedFuture is a ListenableFuture that includes versions
of the get methods that can throw a checked exception. |
interface |
FutureFallback<V>
Provides a backup
Future to replace an earlier failed Future. |
class |
Futures
Static utility methods pertaining to the
Future interface. |
interface |
ListenableScheduledFuture<V>
Helper interface to implement both
ListenableFuture and
ScheduledFuture. |
interface |
ListeningScheduledExecutorService
A
ScheduledExecutorService that returns ListenableFuture
instances from its ExecutorService methods. |
class |
Uninterruptibles
Utilities for treating interruptible operations as uninterruptible.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
MoreExecutors.addDelayedShutdownHook(ExecutorService service,
long terminationTimeout,
TimeUnit timeUnit)
Add a shutdown hook to wait for thread completion in the given
service. |
static <V> ListenableFuture<List<V>> |
Futures.allAsList(Iterable<? extends ListenableFuture<? extends V>> futures)
Creates a new
ListenableFuture whose value is a list containing the
values of all its input futures, if all succeed. |
static <V> ListenableFuture<List<V>> |
Futures.allAsList(ListenableFuture<? extends V>... futures)
Creates a new
ListenableFuture whose value is a list containing the
values of all its input futures, if all succeed. |
static ExecutorService |
MoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor)
Converts the given ThreadPoolExecutor into an ExecutorService that exits
when the application is complete.
|
static ExecutorService |
MoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor,
long terminationTimeout,
TimeUnit timeUnit)
Converts the given ThreadPoolExecutor into an ExecutorService that exits
when the application is complete.
|
static ScheduledExecutorService |
MoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor)
Converts the given ThreadPoolExecutor into a ScheduledExecutorService that
exits when the application is complete.
|
static ScheduledExecutorService |
MoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor,
long terminationTimeout,
TimeUnit timeUnit)
Converts the given ScheduledThreadPoolExecutor into a
ScheduledExecutorService that exits when the application is complete.
|
static ThreadFactory |
MoreExecutors.platformThreadFactory()
Returns a default thread factory used to create new threads.
|
static <V> ListenableFuture<List<V>> |
Futures.successfulAsList(Iterable<? extends ListenableFuture<? extends V>> futures)
Creates a new
ListenableFuture whose value is a list containing the
values of all its successful input futures. |
static <V> ListenableFuture<List<V>> |
Futures.successfulAsList(ListenableFuture<? extends V>... futures)
Creates a new
ListenableFuture whose value is a list containing the
values of all its successful input futures. |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayBasedCharEscaper
A
CharEscaper that uses an array to quickly look up replacement
characters for a given char value. |
class |
ArrayBasedEscaperMap
An implementation-specific parameter class suitable for initializing
ArrayBasedCharEscaper or ArrayBasedUnicodeEscaper instances. |
class |
ArrayBasedUnicodeEscaper
A
UnicodeEscaper that uses an array to quickly look up replacement
characters for a given code point. |
class |
CharEscaper
An object that converts literal text into a format safe for inclusion in a particular context
(such as an XML document).
|
class |
Escaper
An object that converts literal text into a format safe for inclusion in a particular context
(such as an XML document).
|
class |
Escapers
Static utility methods pertaining to
Escaper instances. |
static class |
Escapers.Builder
A builder for simple, fast escapers.
|
class |
UnicodeEscaper
An
Escaper that converts literal text into a format safe for
inclusion in a particular context (such as an XML document). |
| Modifier and Type | Interface and Description |
|---|---|
interface |
Funnel<T>
An object which can send data from an object of type
T into a PrimitiveSink. |
class |
Funnels
Funnels for common types.
|
class |
HashCode
An immutable hash code of arbitrary bit length.
|
interface |
Hasher
A
PrimitiveSink that can compute a hash code after reading the input. |
interface |
HashFunction
A hash function is a collision-averse pure function that maps an arbitrary block of
data to a number called a hash code.
|
class |
Hashing
Static methods to obtain
HashFunction instances, and other static hashing-related
utilities. |
interface |
PrimitiveSink
An object which can receive a stream of primitive values.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BaseEncoding
A binary encoding scheme for reversibly translating between byte sequences and printable ASCII
strings.
|
interface |
ByteProcessor<T>
A callback interface to process bytes from a stream.
|
class |
ByteStreams
Provides utility methods for working with byte arrays and I/O streams.
|
class |
CharStreams
Provides utility methods for working with character streams.
|
class |
Closeables
Utility methods for working with
Closeable objects. |
class |
Closer
|
class |
Files
Provides utility methods for working with files.
|
interface |
LineProcessor<T>
A callback to be used with the streaming
readLines methods. |
class |
LineReader
A class for reading lines of text.
|
class |
Resources
Provides utility methods for working with resources in the classpath.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
ByteSource.read(ByteProcessor<T> processor)
Reads the contents of this byte source using the given
processor to process bytes as
they are read. |
<T> T |
CharSource.readLines(LineProcessor<T> processor)
Reads lines of text from this source, processing each line as it is read using the given
processor. |
| Modifier and Type | Class and Description |
|---|---|
class |
InetAddresses
Static utility methods pertaining to
InetAddress instances. |
static class |
InetAddresses.TeredoInfo
A simple immutable data class to encapsulate the information to be found in a
Teredo address.
|
| Modifier and Type | Class and Description |
|---|---|
class |
UnsignedInts
Static utility methods pertaining to
int primitives that interpret values as
unsigned (that is, any negative value x is treated as the positive value
2^32 + x). |
class |
UnsignedLongs
Static utility methods pertaining to
long primitives that interpret values as
unsigned (that is, any negative value x is treated as the positive value
2^64 + x). |
| Modifier and Type | Method and Description |
|---|---|
static byte |
UnsignedBytes.parseUnsignedByte(String string)
Returns the unsigned
byte value represented by the given decimal string. |
static byte |
UnsignedBytes.parseUnsignedByte(String string,
int radix)
Returns the unsigned
byte value represented by a string with the given radix. |
static Converter<String,Long> |
Longs.stringConverter()
Returns a serializable converter object that converts between strings and
longs using
Long.decode(java.lang.String) and Long.toString(). |
static Converter<String,Short> |
Shorts.stringConverter()
Returns a serializable converter object that converts between strings and
shorts using
Short.decode(java.lang.String) and Short.toString(). |
static String |
UnsignedBytes.toString(byte x)
Returns a string representation of x, where x is treated as unsigned.
|
static String |
UnsignedBytes.toString(byte x,
int radix)
Returns a string representation of
x for the given radix, where x is treated
as unsigned. |
static Long |
Longs.tryParse(String string)
Parses the specified string as a signed decimal long value.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ClassPath
Scans the source of a
ClassLoader and finds all loadable classes and resources. |
static class |
ClassPath.ClassInfo
Represents a class that can be loaded through
ClassPath.ClassInfo.load(). |
static class |
ClassPath.ResourceInfo
Represents a class path resource that can be either a class file or any other resource file
loadable from the class path.
|
class |
Reflection
Static utilities relating to Java reflection.
|
Copyright © 2020. All rights reserved.