Uses of Annotation Interface
com.google.common.annotations.J2ktIncompatible
Packages that use J2ktIncompatible
Package
Description
Basic utility libraries and interfaces.
Collection interfaces and implementations, and other utilities for collections.
Utility methods and classes for I/O; for example input streams, output streams, readers, writers,
and files.
Arithmetic functions operating on primitive values and on
BigInteger
and BigDecimal
instances.Utility methods and classes for networking (such as IP addresses and domain names).
Static utilities for the eight primitive types and
void
, and value types for treating
them as unsigned or storing them in immutable arrays.Testing utilities.
Concurrency utilities.
-
Uses of J2ktIncompatible in com.google.common.base
Classes in com.google.common.base with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionprivate static final class
Fast matcher using aBitSet
table of matching characters.final class
This class provides default values for all Java types, as defined by the JLS.final class
Utility methods for working withEnum
instances.class
Phantom reference with afinalizeReferent()
method which a background thread invokes after the garbage collector reclaims the referent.interface
Implemented by references that have code to run after garbage collection of their referents.class
A reference queue with an associated background thread that dequeues references and invokesFinalizableReference.finalizeReferent()
on them.class
Soft reference with afinalizeReferent()
method which a background thread invokes after the garbage collector reclaims the referent.class
Weak reference with afinalizeReferent()
method which a background thread invokes after the garbage collector reclaims the referent.(package private) final class
Wrappers aroundBuffer
methods that are covariantly overridden in Java 9+.(package private) final class
A regex pattern implementation which is backed by thePattern
.(package private) interface
Pluggable interface for compiling a regex pattern.private static class
private static class
private static class
(package private) final class
An immutable version of CharMatcher for smallish sets of characters that uses a hash table with linear probing to check for matches.enum
Represents a standard system property.Fields in com.google.common.base with annotations of type J2ktIncompatibleModifier and TypeFieldDescriptionprivate static final Method
Throwables.getStackTraceDepthMethod
The "getStackTraceDepth" method, only available on some JDKs so we use reflection to find it when available.private static final Method
Throwables.getStackTraceElementMethod
The "getStackTraceElementMethod" method, only available on some JDKs so we use reflection to find it when available.private static final String
Throwables.JAVA_LANG_ACCESS_CLASSNAME
JavaLangAccess class name to load using reflectionprivate static final Object
Throwables.jla
Access to some fancy internal JVM internals.private static final long
Predicates.InstanceOfPredicate.serialVersionUID
(package private) static final String
Throwables.SHARED_SECRETS_CLASSNAME
SharedSecrets class name to load using reflectionstatic final Charset
Charsets.US_ASCII
US-ASCII: seven-bit ASCII, the Basic Latin block of the Unicode character set (ISO646-US).static final Charset
Charsets.UTF_16
UTF-16: sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark.static final Charset
Charsets.UTF_16BE
UTF-16BE: sixteen-bit UCS Transformation Format, big-endian byte order.static final Charset
Charsets.UTF_16LE
UTF-16LE: sixteen-bit UCS Transformation Format, little-endian byte order.Methods in com.google.common.base with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionstatic Predicate<CharSequence>
Returns a predicate that evaluates totrue
if theCharSequence
being tested contains any match for the given regular expression pattern.static Predicate<CharSequence>
Predicates.containsPattern
(String pattern) Returns a predicate that evaluates totrue
if theCharSequence
being tested contains any match for the given regular expression pattern.Stopwatch.elapsed()
Returns the current elapsed time shown on this stopwatch as aDuration
.static <X extends Throwable>
XThrowables.getCauseAs
(Throwable throwable, Class<X> expectedCauseType) Returnsthrowable
's cause, cast toexpectedCauseType
.private static Method
Throwables.getGetMethod()
Returns the Method that can be used to resolve an individual StackTraceElement, or null if that method cannot be found (it is only to be found in fairly recent JDKs).private static Object
Throwables.getJLA()
Returns the JavaLangAccess class that is present in all Sun JDKs.private static Method
Throwables.getJlaMethod
(String name, Class<?>... parameterTypes) private static Method
Throwables.getSizeMethod
(Object jla) Returns the Method that can be used to return the size of a stack, or null if that method cannot be found (it is only to be found in fairly recent JDKs).private static Object
Throwables.invokeAccessibleNonThrowingMethod
(Method method, Object receiver, Object... params) private static boolean
CharMatcher.isSmall
(int totalCharacters, int tableLength) private static List<StackTraceElement>
Throwables.jlaStackTrace
(Throwable t) static List<StackTraceElement>
Throwables.lazyStackTrace
(Throwable throwable) Deprecated.static boolean
Throwables.lazyStackTraceIsLazy()
Deprecated.This method always returns false on JDK versions past JDK 8 and on all Android versions.static Splitter
Returns a splitter that considers any subsequence matchingpattern
to be a separator.static Splitter
Returns a splitter that considers any subsequence matching a given pattern (regular expression) to be a separator.(package private) CharMatcher
CharMatcher.precomputedInternal()
This is the actual implementation ofCharMatcher.precomputed()
, but we bounce calls through a method onPlatform
so that we can have different behavior in GWT.private static CharMatcher
CharMatcher.precomputedPositive
(int totalCharacters, BitSet table, String description) Helper method forCharMatcher.precomputedInternal()
that doesn't test if the negation is cheaper.static RuntimeException
Deprecated.To preserve behavior, usethrow e
orthrow new RuntimeException(e)
directly, or use a combination ofThrowables.throwIfUnchecked(java.lang.Throwable)
andthrow new RuntimeException(e)
.static <X extends Throwable>
voidThrowables.propagateIfInstanceOf
(Throwable throwable, Class<X> declaredType) Deprecated.UseThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>)
, which has the same behavior but rejectsnull
.static void
Throwables.propagateIfPossible
(Throwable throwable) Deprecated.UseThrowables.throwIfUnchecked(java.lang.Throwable)
, which has the same behavior but rejectsnull
.static <X extends Throwable>
voidThrowables.propagateIfPossible
(Throwable throwable, Class<X> declaredType) Propagatesthrowable
exactly as-is, if and only if it is an instance ofRuntimeException
,Error
, ordeclaredType
.Throwables.propagateIfPossible
(Throwable throwable, Class<X1> declaredType1, Class<X2> declaredType2) Propagatesthrowable
exactly as-is, if and only if it is an instance ofRuntimeException
,Error
,declaredType1
, ordeclaredType2
.(package private) void
(package private) void
(package private) void
(package private) void
(package private) void
(package private) void
(package private) void
(package private) void
(package private) void
Sets bits intable
matched by this matcher.(package private) void
Returns a predicate that evaluates totrue
if the class being tested is assignable to (is a subtype of)clazz
.static <X extends Throwable>
voidThrowables.throwIfInstanceOf
(Throwable throwable, Class<X> declaredType) Throwsthrowable
if it is an instance ofdeclaredType
. -
Uses of J2ktIncompatible in com.google.common.collect
Classes in com.google.common.collect with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionprivate static class
CollectCollectors.EnumMapAccumulator<K extends Enum<K>,
V> (package private) class
CompactLinkedHashMap<K,
V> CompactLinkedHashMap is an implementation of a Map with insertion or LRU iteration order, maintained with a doubly linked list through the entries.final class
A multiset that supports concurrent modifications and that provides atomic versions of mostMultiset
operations (exceptions where noted).private static final class
EmptyContiguousSet.SerializedForm<C extends Comparable>
final class
ABiMap
backed by twoEnumMap
instances.final class
EnumHashBiMap<K extends Enum<K>,
V> ABiMap
backed by anEnumMap
instance for keys-to-values, and aHashMap
instance for values-to-keys.final class
EnumMultiset<E extends Enum<E>>
Multiset implementation specialized for enum elements, supporting all single-element operations in O(1).class
Deprecated.This class has moved tocom.google.common.util.concurrent
.class
A deque which forwards all its method calls to another deque.(package private) static class
Serialized form that leads to the same performance as the original list.private static class
Serialized type for all ImmutableBiMap instances.private static class
ImmutableEnumMap.EnumSerializedForm<K extends Enum<K>,
V> private static class
ImmutableEnumSet.EnumSerializedForm<E extends Enum<E>>
(package private) static class
(package private) static class
Serialized type for all ImmutableMap instances.private static class
private static class
private static class
(package private) static class
private static final class
(package private) static class
(package private) static final class
private static class
private static final class
private static class
Serialized type for all ImmutableSortedMap instances.private static final class
private static class
interface
Interner<E>
Provides similar behavior toString.intern()
for any immutable type.final class
Contains static methods pertaining to instances ofInterner
.final class
A builder ofConcurrentMap
instances that can have keys or values automatically wrapped in weak references.(package private) class
MapMakerInternalMap<K,
V, E extends MapMakerInternalMap.InternalEntry<K, V, E>, S extends MapMakerInternalMap.Segment<K, V, E, S>> The concurrent hash map implementation built byMapMaker
.final class
A mutable class-to-instance map backed by an arbitrary user-provided map.(package private) static class
private static class
private static final class
RegularContiguousSet.SerializedForm<C extends Comparable>
private static class
private static class
private static class
(package private) final class
Provides static methods for serializing collection classes.Fields in com.google.common.collect with annotations of type J2ktIncompatibleModifier and TypeFieldDescriptionprivate static final long
AbstractBiMap.Inverse.serialVersionUID
private static final long
AbstractBiMap.serialVersionUID
private static final long
AbstractMapBasedMultiset.serialVersionUID
private static final long
ArrayListMultimap.serialVersionUID
private static final long
HashBiMap.serialVersionUID
private static final long
HashMultimap.serialVersionUID
private static final long
HashMultiset.serialVersionUID
private static final long
ImmutableListMultimap.serialVersionUID
private static final long
ImmutableMultimap.serialVersionUID
private static final long
ImmutableMultimap.Values.serialVersionUID
private static final long
ImmutableMultiset.EntrySet.serialVersionUID
private static final long
ImmutableSetMultimap.serialVersionUID
private static final long
LinkedHashMultimap.serialVersionUID
private static final long
LinkedHashMultiset.serialVersionUID
private static final long
LinkedListMultimap.serialVersionUID
private static final long
Lists.OnePlusArrayList.serialVersionUID
private static final long
Lists.TwoPlusArrayList.serialVersionUID
private static final long
Multimaps.CustomListMultimap.serialVersionUID
private static final long
Multimaps.CustomMultimap.serialVersionUID
private static final long
Multimaps.CustomSetMultimap.serialVersionUID
private static final long
Multimaps.CustomSortedSetMultimap.serialVersionUID
private static final long
RegularImmutableMap.KeySet.SerializedForm.serialVersionUID
private static final long
RegularImmutableMap.serialVersionUID
private static final long
RegularImmutableMap.Values.SerializedForm.serialVersionUID
private static final long
Synchronized.SynchronizedObject.serialVersionUID
private static final long
TreeMultimap.serialVersionUID
private static final long
TreeMultiset.serialVersionUID
Methods in com.google.common.collect with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionOrdering.arbitrary()
Returns an arbitrary ordering over all objects, for whichcompare(a, b) == 0
impliesa == b
(identity equality).Sets.complementOf
(Collection<E> collection) Creates anEnumSet
consisting of all enum values that are not in the specified collection.static <E> int
Queues.drain
(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, long timeout, TimeUnit unit) Drains the queue asBlockingQueue.drainTo(Collection, int)
, but if the requestednumElements
elements are not available, it will wait for them up to the specified timeout.static <E> int
Queues.drain
(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, Duration timeout) Drains the queue asBlockingQueue.drainTo(Collection, int)
, but if the requestednumElements
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> int
Queues.drainUninterruptibly
(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, Duration timeout) Drains the queue as Queues.drain(BlockingQueue, Collection, int, Duration), but with a different behavior in case it is interrupted while waiting.static ImmutableMap<String,
String> Maps.fromProperties
(Properties properties) Creates anImmutableMap<String, String>
from aProperties
instance.static <K extends Enum<K>,
V>
ImmutableMap<K,V> Maps.immutableEnumMap
(Map<K, ? extends V> map) Returns an immutable map instance containing the given entries.static <E> ArrayBlockingQueue<E>
Queues.newArrayBlockingQueue
(int capacity) Creates an emptyArrayBlockingQueue
with the given (fixed) capacity and nonfair access policy.static <E> ConcurrentLinkedQueue<E>
Queues.newConcurrentLinkedQueue()
Creates an emptyConcurrentLinkedQueue
.static <E> ConcurrentLinkedQueue<E>
Queues.newConcurrentLinkedQueue
(Iterable<? extends E> elements) Creates aConcurrentLinkedQueue
containing the elements of the specified iterable, in the order they are returned by the iterable's iterator.static <E> CopyOnWriteArrayList<E>
Lists.newCopyOnWriteArrayList()
Creates an emptyCopyOnWriteArrayList
instance.static <E> CopyOnWriteArrayList<E>
Lists.newCopyOnWriteArrayList
(Iterable<? extends E> elements) Creates aCopyOnWriteArrayList
instance containing the given elements.static <E> CopyOnWriteArraySet<E>
Sets.newCopyOnWriteArraySet()
Creates an emptyCopyOnWriteArraySet
instance.static <E> CopyOnWriteArraySet<E>
Sets.newCopyOnWriteArraySet
(Iterable<? extends E> elements) Creates aCopyOnWriteArraySet
instance containing the given elements.static <E> LinkedBlockingDeque<E>
Queues.newLinkedBlockingDeque()
Creates an emptyLinkedBlockingDeque
with a capacity ofInteger.MAX_VALUE
.static <E> LinkedBlockingDeque<E>
Queues.newLinkedBlockingDeque
(int capacity) Creates an emptyLinkedBlockingDeque
with the given (fixed) capacity.static <E> LinkedBlockingDeque<E>
Queues.newLinkedBlockingDeque
(Iterable<? extends E> elements) Creates aLinkedBlockingDeque
with a capacity ofInteger.MAX_VALUE
, containing the elements of the specified iterable, in the order they are returned by the iterable's iterator.static <E> LinkedBlockingQueue<E>
Queues.newLinkedBlockingQueue()
Creates an emptyLinkedBlockingQueue
with a capacity ofInteger.MAX_VALUE
.static <E> LinkedBlockingQueue<E>
Queues.newLinkedBlockingQueue
(int capacity) Creates an emptyLinkedBlockingQueue
with the given (fixed) capacity.static <E> LinkedBlockingQueue<E>
Queues.newLinkedBlockingQueue
(Iterable<? extends E> elements) Creates aLinkedBlockingQueue
with a capacity ofInteger.MAX_VALUE
, containing the elements of the specified iterable, in the order they are returned by the iterable's iterator.static <E extends Comparable>
PriorityBlockingQueue<E>Queues.newPriorityBlockingQueue()
Creates an emptyPriorityBlockingQueue
with the ordering given by its elements' natural ordering.static <E extends Comparable>
PriorityBlockingQueue<E>Queues.newPriorityBlockingQueue
(Iterable<? extends E> elements) Creates aPriorityBlockingQueue
containing the given elements.static <E> SynchronousQueue<E>
Queues.newSynchronousQueue()
Creates an emptySynchronousQueue
with nonfair access policy.(package private) void
MapMakerInternalMap.AbstractSerializationProxy.readEntries
(ObjectInputStream in) (package private) MapMaker
MapMakerInternalMap.AbstractSerializationProxy.readMapMaker
(ObjectInputStream in) private void
AbstractBiMap.Inverse.readObject
(ObjectInputStream stream) private void
ArrayListMultimap.readObject
(ObjectInputStream stream) private void
CompactHashMap.readObject
(ObjectInputStream stream) private void
CompactHashSet.readObject
(ObjectInputStream stream) private void
ConcurrentHashMultiset.readObject
(ObjectInputStream stream) private void
EmptyContiguousSet.readObject
(ObjectInputStream stream) private void
HashBiMap.Inverse.readObject
(ObjectInputStream in) private void
HashBiMap.readObject
(ObjectInputStream stream) private void
HashMultimap.readObject
(ObjectInputStream stream) private void
HashMultiset.readObject
(ObjectInputStream stream) private void
ImmutableAsList.readObject
(ObjectInputStream stream) private void
ImmutableBiMap.readObject
(ObjectInputStream stream) private void
ImmutableCollection.readObject
(ObjectInputStream stream) private void
ImmutableEnumMap.readObject
(ObjectInputStream stream) private void
ImmutableEnumSet.readObject
(ObjectInputStream stream) private void
ImmutableList.readObject
(ObjectInputStream stream) private void
ImmutableListMultimap.readObject
(ObjectInputStream stream) private void
ImmutableMap.readObject
(ObjectInputStream stream) private void
ImmutableMapEntrySet.readObject
(ObjectInputStream stream) private void
ImmutableMultimap.Keys.readObject
(ObjectInputStream stream) private void
ImmutableMultiset.EntrySet.readObject
(ObjectInputStream stream) private void
ImmutableMultiset.readObject
(ObjectInputStream stream) private void
ImmutableRangeMap.readObject
(ObjectInputStream stream) private void
ImmutableRangeSet.AsSet.readObject
(ObjectInputStream stream) private void
ImmutableRangeSet.readObject
(ObjectInputStream stream) private void
ImmutableSet.readObject
(ObjectInputStream stream) private void
ImmutableSetMultimap.readObject
(ObjectInputStream stream) private void
ImmutableSortedMap.readObject
(ObjectInputStream stream) private void
ImmutableSortedMultiset.readObject
(ObjectInputStream stream) private void
ImmutableSortedSet.readObject
(ObjectInputStream unused) private void
ImmutableTable.readObject
(ObjectInputStream stream) private void
LinkedHashMultimap.readObject
(ObjectInputStream stream) private void
LinkedHashMultiset.readObject
(ObjectInputStream stream) private void
LinkedListMultimap.readObject
(ObjectInputStream stream) private void
MapMakerInternalMap.readObject
(ObjectInputStream in) private void
MapMakerInternalMap.SerializationProxy.readObject
(ObjectInputStream in) private void
Multimaps.CustomListMultimap.readObject
(ObjectInputStream stream) private void
Multimaps.CustomMultimap.readObject
(ObjectInputStream stream) private void
Multimaps.CustomSetMultimap.readObject
(ObjectInputStream stream) private void
Multimaps.CustomSortedSetMultimap.readObject
(ObjectInputStream stream) private void
RegularContiguousSet.readObject
(ObjectInputStream stream) private void
RegularImmutableBiMap.Inverse.readObject
(ObjectInputStream stream) private void
TreeMultimap.readObject
(ObjectInputStream stream) private void
TreeMultiset.readObject
(ObjectInputStream stream) private void
AbstractMapBasedMultiset.readObjectNoData()
(package private) Object
AbstractBiMap.Inverse.readResolve()
Object[]
EvictingQueue.toArray()
final Object[]
ImmutableCollection.toArray()
Object[]
MinMaxPriorityQueue.toArray()
(package private) static <T,
K extends Enum<K>, V>
Collector<T,?, ImmutableMap<K, V>> CollectCollectors.toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) (package private) static <T,
K extends Enum<K>, V>
Collector<T,?, ImmutableMap<K, V>> CollectCollectors.toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) static <T,
K extends Enum<K>, V>
Collector<T,?, ImmutableMap<K, V>> Maps.toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) Returns aCollector
that accumulates elements into anImmutableMap
whose keys and values are the result of applying the provided mapping functions to the input elements.static <T,
K extends Enum<K>, V>
Collector<T,?, ImmutableMap<K, V>> Maps.toImmutableEnumMap
(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, BinaryOperator<V> mergeFunction) Returns aCollector
that accumulates elements into anImmutableMap
whose keys and values are the result of applying the provided mapping functions to the input elements.(package private) static MapMaker
Platform.tryWeakKeys
(MapMaker mapMaker) Configures the given map maker to use weak keys, if possible; does nothing otherwise (i.e., in GWT).private void
AbstractBiMap.Inverse.writeObject
(ObjectOutputStream stream) private void
ArrayListMultimap.writeObject
(ObjectOutputStream stream) private void
CompactHashMap.writeObject
(ObjectOutputStream stream) private void
CompactHashSet.writeObject
(ObjectOutputStream stream) private void
HashBiMap.writeObject
(ObjectOutputStream stream) private void
HashMultimap.writeObject
(ObjectOutputStream stream) private void
HashMultiset.writeObject
(ObjectOutputStream stream) private void
ImmutableListMultimap.writeObject
(ObjectOutputStream stream) private void
ImmutableSetMultimap.writeObject
(ObjectOutputStream stream) private void
LinkedHashMultimap.writeObject
(ObjectOutputStream stream) private void
LinkedHashMultiset.writeObject
(ObjectOutputStream stream) private void
LinkedListMultimap.writeObject
(ObjectOutputStream stream) private void
Multimaps.CustomListMultimap.writeObject
(ObjectOutputStream stream) private void
Multimaps.CustomMultimap.writeObject
(ObjectOutputStream stream) private void
Multimaps.CustomSetMultimap.writeObject
(ObjectOutputStream stream) private void
Multimaps.CustomSortedSetMultimap.writeObject
(ObjectOutputStream stream) private void
Synchronized.SynchronizedObject.writeObject
(ObjectOutputStream stream) private void
TreeMultimap.writeObject
(ObjectOutputStream stream) private void
TreeMultiset.writeObject
(ObjectOutputStream stream) (package private) Object
ContiguousSet.writeReplace()
(package private) Object
DenseImmutableTable.Column.writeReplace()
(package private) Object
DenseImmutableTable.ColumnMap.writeReplace()
(package private) Object
DenseImmutableTable.ImmutableArrayMap.writeReplace()
(package private) Object
DenseImmutableTable.Row.writeReplace()
(package private) Object
DenseImmutableTable.RowMap.writeReplace()
(package private) Object
DenseImmutableTable.writeReplace()
(package private) Object
DescendingImmutableSortedMultiset.writeReplace()
(package private) Object
DescendingImmutableSortedSet.writeReplace()
(package private) Object
EmptyContiguousSet.writeReplace()
(package private) Object
ImmutableAsList.writeReplace()
(package private) Object
ImmutableBiMap.writeReplace()
(package private) Object
ImmutableCollection.writeReplace()
(package private) Object
ImmutableEnumMap.writeReplace()
(package private) Object
ImmutableEnumSet.writeReplace()
(package private) Object
ImmutableList.ReverseImmutableList.writeReplace()
(package private) Object
ImmutableList.SubList.writeReplace()
(package private) Object
ImmutableList.writeReplace()
(package private) Object
ImmutableMap.IteratorBasedImmutableMap.writeReplace()
(package private) Object
ImmutableMap.MapViewOfValuesAsSingletonSets.writeReplace()
(package private) Object
ImmutableMap.writeReplace()
Returns a serializable form of this object.(package private) Object
ImmutableMapEntrySet.RegularEntrySet.writeReplace()
(package private) Object
ImmutableMapEntrySet.writeReplace()
(package private) Object
ImmutableMapKeySet.writeReplace()
(package private) Object
ImmutableMapValues.writeReplace()
(package private) Object
ImmutableMultimap.EntryCollection.writeReplace()
(package private) Object
ImmutableMultimap.Keys.writeReplace()
(package private) Object
ImmutableMultimap.Values.writeReplace()
(package private) Object
ImmutableMultiset.ElementSet.writeReplace()
(package private) Object
ImmutableMultiset.EntrySet.writeReplace()
(package private) Object
ImmutableMultiset.writeReplace()
(package private) Object
ImmutableRangeSet.AsSet.writeReplace()
(package private) Object
ImmutableRangeSet.ComplementRanges.writeReplace()
(package private) Object
ImmutableRangeSet.writeReplace()
(package private) Object
ImmutableSet.CachingAsList.writeReplace()
(package private) Object
ImmutableSet.Indexed.writeReplace()
(package private) Object
ImmutableSet.writeReplace()
(package private) Object
ImmutableSetMultimap.EntrySet.writeReplace()
(package private) Object
ImmutableSortedAsList.writeReplace()
(package private) Object
ImmutableSortedMap.writeReplace()
(package private) Object
ImmutableSortedMultiset.writeReplace()
(package private) Object
ImmutableSortedSet.writeReplace()
(package private) abstract Object
ImmutableTable.writeReplace()
(package private) Object
IndexedImmutableSet.writeReplace()
(package private) Object
JdkBackedImmutableBiMap.InverseEntries.writeReplace()
(package private) Object
JdkBackedImmutableBiMap.writeReplace()
(package private) Object
JdkBackedImmutableMap.writeReplace()
(package private) Object
JdkBackedImmutableMultiset.writeReplace()
(package private) Object
JdkBackedImmutableSet.writeReplace()
(package private) Object
Lists.StringAsImmutableList.writeReplace()
(package private) Object
RegularContiguousSet.writeReplace()
(package private) Object
RegularImmutableAsList.writeReplace()
(package private) Object
RegularImmutableBiMap.Inverse.InverseEntrySet.writeReplace()
(package private) Object
RegularImmutableBiMap.Inverse.writeReplace()
(package private) Object
RegularImmutableBiMap.writeReplace()
(package private) Object
RegularImmutableList.writeReplace()
(package private) Object
RegularImmutableMap.KeySet.writeReplace()
(package private) Object
RegularImmutableMap.Values.writeReplace()
(package private) Object
RegularImmutableMap.writeReplace()
(package private) Object
RegularImmutableMultiset.writeReplace()
(package private) Object
RegularImmutableSet.writeReplace()
(package private) Object
RegularImmutableSortedMultiset.writeReplace()
(package private) Object
RegularImmutableSortedSet.writeReplace()
(package private) Object
RegularImmutableTable.CellSet.writeReplace()
(package private) Object
RegularImmutableTable.Values.writeReplace()
(package private) abstract Object
RegularImmutableTable.writeReplace()
(package private) Object
SingletonImmutableBiMap.writeReplace()
(package private) Object
SingletonImmutableList.writeReplace()
(package private) Object
SingletonImmutableSet.writeReplace()
(package private) Object
SingletonImmutableTable.writeReplace()
(package private) Object
SparseImmutableTable.writeReplace()
-
Uses of J2ktIncompatible in com.google.common.collect.testing
Methods in com.google.common.collect.testing with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionstatic Method
static <K extends Comparable,
V>
Iterable<Map.Entry<K,V>> Helpers.orderEntriesByKey
(List<Map.Entry<K, V>> insertionOrder) -
Uses of J2ktIncompatible in com.google.common.io
Classes in com.google.common.io with annotations of type J2ktIncompatibleModifier and TypeClassDescription(package private) class
Writer that places all output on anAppendable
target.interface
An extension ofDataInput
for reading from in-memory byte arrays; its methods offer identical functionality but do not throwIOException
.interface
An extension ofDataOutput
for writing to in-memory byte arrays; its methods offer identical functionality but do not throwIOException
.interface
A callback interface to process bytes from a stream.class
A destination to which bytes can be written, such as a file.class
A readable source of bytes, such as a file.final class
Provides utility methods for working with byte arrays and I/O streams.(package private) final class
AReader
that reads the characters in aCharSequence
.class
A destination to which characters can be written, such as a text file.class
A readable source of characters, such as a text file.final class
Provides utility methods for working with character streams.final class
Utility methods for working withCloseable
objects.final class
final class
AnInputStream
that counts the number of bytes read.final class
An OutputStream that counts the number of bytes written.final class
AnOutputStream
that starts buffering to a byte array, but switches to file buffering once the data reaches a configurable size.final class
Provides utility methods for working with files.enum
Modes for opening a file for writing.final class
Utility methods for working withFlushable
objects.final class
Exception indicating that a recursive delete can't be performed because the file system does not have the support necessary to guarantee that it is not vulnerable to race conditions that would allow it to delete files and directories outside of the directory being deleted (i.e.,SecureDirectoryStream
is not supported).(package private) final class
Wrappers aroundBuffer
methods that are covariantly overridden in Java 9+.(package private) class
Package-protected abstract class that implements the line reading algorithm used byLineReader
.interface
A callback to be used with the streamingreadLines
methods.final class
A class for reading lines of text.final class
An implementation ofDataInput
that uses little-endian byte ordering for readingshort
,int
,float
,double
, andlong
values.final class
An implementation ofDataOutput
that uses little-endian byte ordering for writingchar
,short
,int
,float
,double
, andlong
values.final class
(package private) final class
AnInputStream
that concatenates multiple substreams.(package private) class
AReader
that concatenates multiple readers.final class
File name filter that only accepts files matching a regular expression.(package private) final class
AnInputStream
that converts characters from aReader
into bytes using an arbitrary Charset.enum
Options for use with recursive delete methods (MoreFiles.deleteRecursively(java.nio.file.Path, com.google.common.io.RecursiveDeleteOption...)
andMoreFiles.deleteDirectoryContents(java.nio.file.Path, com.google.common.io.RecursiveDeleteOption...)
).final class
Provides utility methods for working with resources in the classpath.(package private) class
Creates temporary files and directories whose permissions are restricted to the current user or, in the case of Android, the current app.Methods in com.google.common.io with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionfinal ByteSource
BaseEncoding.decodingSource
(CharSource encodedSource) Returns aByteSource
that reads base-encoded bytes from the specifiedCharSource
.abstract InputStream
BaseEncoding.decodingStream
(Reader reader) Returns anInputStream
that decodes base-encoded input from the specifiedReader
.BaseEncoding.SeparatedBaseEncoding.decodingStream
(Reader reader) BaseEncoding.StandardBaseEncoding.decodingStream
(Reader reader) final ByteSink
BaseEncoding.encodingSink
(CharSink encodedSink) Returns aByteSink
that writes base-encoded bytes to the specifiedCharSink
.abstract OutputStream
BaseEncoding.encodingStream
(Writer writer) Returns anOutputStream
that encodes bytes using this encoding into the specifiedWriter
.BaseEncoding.SeparatedBaseEncoding.encodingStream
(Writer output) BaseEncoding.StandardBaseEncoding.encodingStream
(Writer out) (package private) static Reader
BaseEncoding.ignoringReader
(Reader delegate, String toIgnore) (package private) static Writer
BaseEncoding.separatingWriter
(Writer delegate, String separator, int afterEveryChars) -
Uses of J2ktIncompatible in com.google.common.math
Classes in com.google.common.math with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionclass
A class for arithmetic onBigDecimal
that is not covered by its built-in methods.private static class
class
The representation of a linear transformation between real numbersx
andy
.final class
An immutable value object capturing some basic statistics about a collection of paired double values (e.g.final class
A mutable object which accumulates paired double values (e.g.final class
Provides a fluent API for calculating quantiles.final class
A bundle of statistical summary values -- sum, count, mean/average, min and max, and several forms of variance -- that were computed from a single set of zero or more floating-point values.final class
A mutable object which accumulates double values and tracks some basic statistics over all the values added so far.(package private) class
ToDoubleRounder<X extends Number & Comparable<X>>
Fields in com.google.common.math with annotations of type J2ktIncompatibleModifier and TypeFieldDescription(package private) static final long[]
LongMath.halfPowersOf10
(package private) static final long[]
LongMath.powersOf10
Methods in com.google.common.math with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionstatic long
LongMath.checkedPow
(long b, int k) Returns theb
to thek
th power, provided it does not overflow.static long
LongMath.checkedSubtract
(long a, long b) Returns the difference ofa
andb
, provided it does not overflow.private static double
DoubleMath.checkFinite
(double argument) static BigInteger
BigIntegerMath.divide
(BigInteger p, BigInteger q, RoundingMode mode) Returns the result of dividingp
byq
, rounding using the specifiedRoundingMode
.static long
LongMath.divide
(long p, long q, RoundingMode mode) Returns the result of dividingp
byq
, rounding using the specifiedRoundingMode
.static long
LongMath.factorial
(int n) Returnsn!
, that is, the product of the firstn
positive integers,1
ifn == 0
, orLong.MAX_VALUE
if the result does not fit in along
.(package private) static boolean
BigIntegerMath.fitsInLong
(BigInteger x) static boolean
DoubleMath.isPowerOfTwo
(double x) Returnstrue
ifx
is exactly equal to2^k
for some finite integerk
.static boolean
IntMath.isPrime
(int n) Returnstrue
ifn
is a prime number: an integer greater than one that cannot be factored into a product of smaller positive integers.static boolean
LongMath.isPrime
(long n) Returnstrue
ifn
is a prime number: an integer greater than one that cannot be factored into a product of smaller positive integers.static int
BigIntegerMath.log10
(BigInteger x, RoundingMode mode) Returns the base-10 logarithm ofx
, rounded according to the specified rounding mode.static int
IntMath.log10
(int x, RoundingMode mode) Returns the base-10 logarithm ofx
, rounded according to the specified rounding mode.static int
LongMath.log10
(long x, RoundingMode mode) Returns the base-10 logarithm ofx
, rounded according to the specified rounding mode.(package private) static int
LongMath.log10Floor
(long x) static int
DoubleMath.log2
(double x, RoundingMode mode) Returns the base 2 logarithm of a double value, rounded with the specified rounding mode to anint
.static double
DoubleMath.mean
(double... values) Deprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)
instead, noting the less strict handling of non-finite values.static double
Deprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)
instead, noting the less strict handling of non-finite values.static double
Deprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)
instead, noting the less strict handling of non-finite values.static int
LongMath.mod
(long x, int m) Returnsx mod m
, a non-negative value less thanm
.static long
LongMath.mod
(long x, long m) Returnsx mod m
, a non-negative value less thanm
.static int
IntMath.pow
(int b, int k) Returnsb
to thek
th power.static long
LongMath.pow
(long b, int k) Returnsb
to thek
th power.(package private) static double
DoubleMath.roundIntermediate
(double x, RoundingMode mode) static BigInteger
DoubleMath.roundToBigInteger
(double x, RoundingMode mode) Returns theBigInteger
value that is equal tox
rounded with the specified rounding mode, if possible.static double
BigIntegerMath.roundToDouble
(BigInteger x, RoundingMode mode) Returnsx
, rounded to adouble
with the specified rounding mode.static double
LongMath.roundToDouble
(long x, RoundingMode mode) Returnsx
, rounded to adouble
with the specified rounding mode.static int
DoubleMath.roundToInt
(double x, RoundingMode mode) Returns theint
value that is equal tox
rounded with the specified rounding mode, if possible.static long
DoubleMath.roundToLong
(double x, RoundingMode mode) Returns thelong
value that is equal tox
rounded with the specified rounding mode, if possible.static BigInteger
BigIntegerMath.sqrt
(BigInteger x, RoundingMode mode) Returns the square root ofx
, rounded with the specified rounding mode.static long
LongMath.sqrt
(long x, RoundingMode mode) Returns the square root ofx
, rounded with the specified rounding mode.private static BigInteger
BigIntegerMath.sqrtApproxWithDoubles
(BigInteger x) private static BigInteger
BigIntegerMath.sqrtFloor
(BigInteger x) -
Uses of J2ktIncompatible in com.google.common.net
Classes in com.google.common.net with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionfinal class
A syntactically valid host specifier, suitable for use in a URI.final class
Static utility methods pertaining toInetAddress
instances. -
Uses of J2ktIncompatible in com.google.common.primitives
Classes in com.google.common.primitives with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionfinal class
Static utility methods pertaining tobyte
primitives that interpret values as unsigned (that is, any negative valueb
is treated as the positive value256 + b
).Fields in com.google.common.primitives with annotations of type J2ktIncompatibleModifier and TypeFieldDescription(package private) static final Pattern
Doubles.FLOATING_POINT_PATTERN
This is adapted from the regex suggested byDouble.valueOf(String)
for prevalidating inputs.Methods in com.google.common.primitives with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionUnsignedInteger.times
(UnsignedInteger val) Returns the result of multiplying this andval
.static Double
Parses the specified string as a double-precision floating point value.static Float
Parses the specified string as a single-precision floating point value. -
Uses of J2ktIncompatible in com.google.common.testing
Classes in com.google.common.testing with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionclass
Automatically runs sanity checks against top level classes in the same package of the test that extendsAbstractPackageSanityTests
.final class
Supplies an arbitrary "default" instance for a wide range of types, often useful in testing utilities.final class
Tester that runs automated sanity tests for any given class.(package private) class
Generates a dummy interface proxy that simply returns a dummy value for each method.final class
Tester to ensure forwarding wrapper works by delegating calls to the corresponding method with the same parameters forwarded and return value forwarded back or exception propagated as is.(package private) class
Generates fresh instances of types that are different from each other (if possible).final class
Testing utilities relating to garbage collection finalization.final class
A test utility that verifies that your methods and constructors throwNullPointerException
orUnsupportedOperationException
whenever null is passed to a parameter whose declaration or type isn't annotated with an annotation with the simple nameNullable
,CheckForNull
,NullableType
, orNullableDecl
.Methods in com.google.common.testing with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionAdvances the ticker value byduration
.FakeTicker.setAutoIncrementStep
(Duration autoIncrementStep) Sets the increment applied to the ticker whenever it is queried. -
Uses of J2ktIncompatible in com.google.common.util.concurrent
Classes in com.google.common.util.concurrent with annotations of type J2ktIncompatibleModifier and TypeClassDescriptionclass
Base class for services that can implementAbstractExecutionThreadService.startUp()
,AbstractExecutionThreadService.run()
andAbstractExecutionThreadService.shutDown()
methods.class
Base class for services that do not need a thread while "running" but may need one during startup and shutdown.class
AbstractListeningExecutorService
implementation that createsListenableFuture
instances for eachRunnable
andCallable
submitted to it.class
Base class for services that can implementAbstractScheduledService.startUp()
andAbstractScheduledService.shutDown()
but while in the "running" state need to perform a periodic task.class
Base class for implementing services that can handleAbstractService.doStart()
andAbstractService.doStop()
requests, responding to them withAbstractService.notifyStarted()
andAbstractService.notifyStopped()
callbacks.class
Adouble
value that may be updated atomically.class
Adouble
array in which elements may be updated atomically.final class
A map containinglong
values that can be atomically updated.final class
A step in a pipeline of an asynchronous computation.class
TheCycleDetectingLockFactory
createsReentrantLock
instances andReentrantReadWriteLock
instances that detect potential deadlock by checking for cycles in lock acquisition order.final class
A support class forListenableFuture
implementations to manage their listeners.final class
Serializes execution of tasks, somewhat like an "asynchronoussynchronized
block." Each enqueued callable will not be submitted to its associated executor until the previous callable has returned -- and, if the previous callable was anAsyncCallable
, not until theFuture
it returned is done (successful, failed, or cancelled).final class
A TimeLimiter implementation which actually does not attempt to limit time at all.class
ABlockingDeque
which forwards all its method calls to anotherBlockingDeque
.class
ABlockingQueue
which forwards all its method calls to anotherBlockingQueue
.(package private) class
Forwarding wrapper around aCondition
.class
An executor service which forwards all its method calls to another executor service.class
A listening executor service which forwards all its method calls to another listening executor service.(package private) class
Forwarding wrapper around aLock
.(package private) final class
Static methods used to implementFutures.getChecked(Future, Class)
.(package private) class
Hidden superclass ofFluentFuture
that provides us a place to declare special GWT versions of theFluentFuture.catching
family of methods.(package private) class
Hidden superclass ofFutures
that provides us a place to declare special GWT versions of theFutures.catching
family of methods.(package private) final class
This class is forcom.google.common.util.concurrent
use only!final class
Utilities necessary for working with libraries that supply plainFuture
instances.class
AFutureTask
that also implements theListenableFuture
interface.(package private) final class
A list of listeners for implementing a concurrency friendly observable object.interface
AScheduledExecutorService
that returnsListenableFuture
instances from itsExecutorService
methods.final class
A synchronization abstraction supporting waiting on arbitrary boolean conditions.(package private) static class
Represents the current application to register shutdown hooks.private static final class
private static class
private static final class
private static final class
(package private) final class
Works around an android bug, where parking for more than INT_MAX seconds can produce an abort signal on 32 bit devices running Android Q.class
A rate limiter.(package private) final class
Executor ensuring that all Runnables submitted are executed in order, using the provided Executor, and sequentially such that no two will ever be running at the same time.interface
An object with an operational state, plus asynchronousService.startAsync()
andService.stopAsync()
lifecycle methods to transition between states.final class
A manager for monitoring and controlling a set of services.(package private) interface
Superinterface ofServiceManager
to introduce a bridge method forservicesByState()
, to ensure binary compatibility with older Guava versions that specifiedservicesByState()
to returnImmutableMultimap
.final class
A TimeLimiter that runs method calls in the background using anExecutorService
.(package private) class
class
Striped<L>
A stripedLock/Semaphore/ReadWriteLock
.final class
A ThreadFactory builder, providing any combination of these features: whether threads should be marked as daemon threads a naming format a thread priority an uncaught exception handler a backing thread factoryinterface
Imposes a time limit on method calls.(package private) final class
Implementation ofFutures#withTimeout
.final class
Factories forThread.UncaughtExceptionHandler
instances.class
Unchecked version ofTimeoutException
.(package private) class
An abstractExecutorService
that allows subclasses to wrap tasks before they are submitted to the underlying executor.(package private) class
An abstractScheduledExecutorService
that allows subclasses to wrap tasks before they are submitted to the underlying executor.Methods in com.google.common.util.concurrent with annotations of type J2ktIncompatibleModifier and TypeMethodDescriptionstatic void
MoreExecutors.addDelayedShutdownHook
(ExecutorService service, long terminationTimeout, TimeUnit timeUnit) Add a shutdown hook to wait for thread completion in the givenservice
.static void
MoreExecutors.addDelayedShutdownHook
(ExecutorService service, Duration terminationTimeout) Add a shutdown hook to wait for thread completion in the givenservice
.static <T> AsyncCallable<T>
Callables.asAsyncCallable
(Callable<T> callable, ListeningExecutorService listeningExecutorService) Creates anAsyncCallable
from aCallable
.default boolean
ListeningExecutorService.awaitTermination
(Duration timeout) Duration-based overload ofExecutorService.awaitTermination(long, TimeUnit)
.static void
Uninterruptibles.awaitTerminationUninterruptibly
(ExecutorService executor) Invokesexecutor.
awaitTermination(long, TimeUnit)
uninterruptibly with no timeout.static boolean
Uninterruptibles.awaitTerminationUninterruptibly
(ExecutorService executor, long timeout, TimeUnit unit) Invokesexecutor.
awaitTermination(long, TimeUnit)
uninterruptibly.static boolean
Uninterruptibles.awaitTerminationUninterruptibly
(ExecutorService executor, Duration timeout) Invokesexecutor.
awaitTermination(long, TimeUnit)
uninterruptibly.static void
Uninterruptibles.awaitUninterruptibly
(CountDownLatch latch) Invokeslatch.
await()
uninterruptibly.static boolean
Uninterruptibles.awaitUninterruptibly
(CountDownLatch latch, long timeout, TimeUnit unit) Invokeslatch.
await(timeout, unit)
uninterruptibly.static boolean
Uninterruptibles.awaitUninterruptibly
(CountDownLatch latch, Duration timeout) Invokeslatch.
await(timeout, unit)
uninterruptibly.static boolean
Uninterruptibles.awaitUninterruptibly
(Condition condition, long timeout, TimeUnit unit) Invokescondition.
await(timeout, unit)
uninterruptibly.static boolean
Uninterruptibles.awaitUninterruptibly
(Condition condition, Duration timeout) Invokescondition.
await(timeout, unit)
uninterruptibly.final <X extends Throwable>
FluentFuture<V>FluentFuture.catching
(Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) Returns aFuture
whose result is taken from thisFuture
or, if thisFuture
fails with the givenexceptionType
, from the result provided by thefallback
.static <V,
X extends Throwable>
ListenableFuture<V>Futures.catching
(ListenableFuture<? extends V> input, Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) Returns aFuture
whose result is taken from the given primaryinput
or, if the primary input fails with the givenexceptionType
, from the result provided by thefallback
.final <X extends Throwable>
FluentFuture<V>FluentFuture.catchingAsync
(Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) Returns aFuture
whose result is taken from thisFuture
or, if thisFuture
fails with the givenexceptionType
, from the result provided by thefallback
.static <V,
X extends Throwable>
ListenableFuture<V>Futures.catchingAsync
(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) Returns aFuture
whose result is taken from the given primaryinput
or, if the primary input fails with the givenexceptionType
, from the result provided by thefallback
.static <V,
X extends Exception>
VFutures.getChecked
(Future<V> future, Class<X> exceptionClass) Returns the result ofFuture.get()
, converting most exceptions to a new instance of the given checked exception type.static <V,
X extends Exception>
VFutures.getChecked
(Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) Returns the result ofFuture.get(long, TimeUnit)
, converting most exceptions to a new instance of the given checked exception type.static <V,
X extends Exception>
VFutures.getChecked
(Future<V> future, Class<X> exceptionClass, Duration timeout) Returns the result ofFuture.get(long, TimeUnit)
, converting most exceptions to a new instance of the given checked exception type.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 ExecutorService
MoreExecutors.getExitingExecutorService
(ThreadPoolExecutor executor, Duration terminationTimeout) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ScheduledExecutorService
MoreExecutors.getExitingScheduledExecutorService
(ScheduledThreadPoolExecutor executor) Converts the given ScheduledThreadPoolExecutor 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 ScheduledExecutorService
MoreExecutors.getExitingScheduledExecutorService
(ScheduledThreadPoolExecutor executor, Duration terminationTimeout) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static <V> V
Uninterruptibles.getUninterruptibly
(Future<V> future, long timeout, TimeUnit unit) Invokesfuture.
get(timeout, unit)
uninterruptibly.static <V> V
Uninterruptibles.getUninterruptibly
(Future<V> future, Duration timeout) Invokesfuture.
get(timeout, unit)
uninterruptibly.ListeningExecutorService.invokeAll
(Collection<? extends Callable<T>> tasks, Duration timeout) Duration-based overload ofListeningExecutorService.invokeAll(Collection, long, TimeUnit)
.default <T> T
ListeningExecutorService.invokeAny
(Collection<? extends Callable<T>> tasks, Duration timeout) Duration-based overload ofExecutorService.invokeAny(Collection, long, TimeUnit)
.(package private) static <T> T
MoreExecutors.invokeAnyImpl
(ListeningExecutorService executorService, Collection<? extends Callable<T>> tasks, boolean timed, long timeout, TimeUnit unit) An implementation ofExecutorService.invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>)
forListeningExecutorService
implementations.(package private) static <T> T
MoreExecutors.invokeAnyImpl
(ListeningExecutorService executorService, Collection<? extends Callable<T>> tasks, boolean timed, Duration timeout) An implementation ofExecutorService.invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>)
forListeningExecutorService
implementations.private static boolean
MoreExecutors.isAppEngineWithApiClasses()
static void
Uninterruptibles.joinUninterruptibly
(Thread toJoin) InvokestoJoin.
join()
uninterruptibly.static void
Uninterruptibles.joinUninterruptibly
(Thread toJoin, long timeout, TimeUnit unit) Invokesunit.
timedJoin(toJoin, timeout)
uninterruptibly.static void
Uninterruptibles.joinUninterruptibly
(Thread toJoin, Duration timeout) Invokesunit.
timedJoin(toJoin, timeout)
uninterruptibly.static <I,
O> Future<O> Futures.lazyTransform
(Future<I> input, Function<? super I, ? extends O> function) LikeFutures.transform(ListenableFuture, Function, Executor)
except that the transformationfunction
is invoked on each call toget()
on the returned future.static ListeningExecutorService
MoreExecutors.listeningDecorator
(ExecutorService delegate) Creates anExecutorService
whosesubmit
andinvokeAll
methods submitListenableFutureTask
instances to the given delegate executor.MoreExecutors.listeningDecorator
(ScheduledExecutorService delegate) Creates aScheduledExecutorService
whosesubmit
andinvokeAll
methods submitListenableFutureTask
instances to the given delegate executor.static ListeningExecutorService
MoreExecutors.newDirectExecutorService()
Creates an executor service that runs each task in the thread that invokesexecute/submit
, as inThreadPoolExecutor.CallerRunsPolicy
.static Executor
MoreExecutors.newSequentialExecutor
(Executor delegate) Returns anExecutor
that runs each task executed sequentially, such that no two tasks are running concurrently.(package private) static Thread
Creates a thread usingMoreExecutors.platformThreadFactory()
, and sets its name toname
unless changing the name is forbidden by the security manager.static ThreadFactory
MoreExecutors.platformThreadFactory()
Returns a default thread factory used to create new threads.static <E> void
Uninterruptibles.putUninterruptibly
(BlockingQueue<E> queue, E element) Invokesqueue.
put(element)
uninterruptibly.(package private) static Executor
MoreExecutors.renamingDecorator
(Executor executor, Supplier<String> nameSupplier) (package private) static ExecutorService
MoreExecutors.renamingDecorator
(ExecutorService service, Supplier<String> nameSupplier) Creates anExecutorService
that renames thethreads
that its tasks run in.(package private) static ScheduledExecutorService
MoreExecutors.renamingDecorator
(ScheduledExecutorService service, Supplier<String> nameSupplier) Creates aScheduledExecutorService
that renames thethreads
that its tasks run in.static <O> ListenableFuture<O>
Futures.scheduleAsync
(AsyncCallable<O> callable, long delay, TimeUnit timeUnit, ScheduledExecutorService executorService) Schedulescallable
on the specifiedexecutor
, returning aFuture
.static <O> ListenableFuture<O>
Futures.scheduleAsync
(AsyncCallable<O> callable, Duration delay, ScheduledExecutorService executorService) Schedulescallable
on the specifiedexecutor
, returning aFuture
.static boolean
MoreExecutors.shutdownAndAwaitTermination
(ExecutorService service, long timeout, TimeUnit unit) Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static boolean
MoreExecutors.shutdownAndAwaitTermination
(ExecutorService service, Duration timeout) Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static void
Uninterruptibles.sleepUninterruptibly
(long sleepFor, TimeUnit unit) Invokesunit.
sleep(sleepFor)
uninterruptibly.static void
Uninterruptibles.sleepUninterruptibly
(Duration sleepFor) Invokesunit.
sleep(sleepFor)
uninterruptibly.private static <T> ListenableFuture<T>
MoreExecutors.submitAndAddQueueListener
(ListeningExecutorService executorService, Callable<T> task, BlockingQueue<Future<T>> queue) Submits the task and adds a listener that adds the future toqueue
when it completes.static <E> E
Uninterruptibles.takeUninterruptibly
(BlockingQueue<E> queue) Invokesqueue.
take()
uninterruptibly.(package private) static Runnable
Callables.threadRenaming
(Runnable task, Supplier<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> Callable<T>
Callables.threadRenaming
(Callable<T> callable, Supplier<String> nameSupplier) Wraps the given callable such that for the duration ofCallable.call()
the thread that is running will have the given name.static boolean
Uninterruptibles.tryAcquireUninterruptibly
(Semaphore semaphore, int permits, long timeout, TimeUnit unit) Invokessemaphore.
tryAcquire(permits, timeout, unit)
uninterruptibly.static boolean
Uninterruptibles.tryAcquireUninterruptibly
(Semaphore semaphore, int permits, Duration timeout) Invokessemaphore.
tryAcquire(permits, timeout, unit)
uninterruptibly.static boolean
Uninterruptibles.tryAcquireUninterruptibly
(Semaphore semaphore, long timeout, TimeUnit unit) Invokessemaphore.
tryAcquire(1, timeout, unit)
uninterruptibly.static boolean
Uninterruptibles.tryAcquireUninterruptibly
(Semaphore semaphore, Duration timeout) Invokessemaphore.
tryAcquire(1, timeout, unit)
uninterruptibly.static boolean
Uninterruptibles.tryLockUninterruptibly
(Lock lock, long timeout, TimeUnit unit) Invokeslock.
tryLock(timeout, unit)
uninterruptibly.static boolean
Uninterruptibles.tryLockUninterruptibly
(Lock lock, Duration timeout) Invokeslock.
tryLock(timeout, unit)
uninterruptibly.private static boolean
Callables.trySetName
(String threadName, Thread currentThread) Tries to set name of the givenThread
, returns true if successful.private static void
MoreExecutors.useDaemonThreadFactory
(ThreadPoolExecutor executor) final FluentFuture<V>
FluentFuture.withTimeout
(long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified timeout expires.final FluentFuture<V>
FluentFuture.withTimeout
(Duration timeout, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified timeout expires.static <V> ListenableFuture<V>
Futures.withTimeout
(ListenableFuture<V> delegate, long time, TimeUnit unit, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to another but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified duration expires.static <V> ListenableFuture<V>
Futures.withTimeout
(ListenableFuture<V> delegate, Duration time, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to another but will finish early (via aTimeoutException
wrapped in anExecutionException
) if the specified duration expires.
Throwable.getStackTrace()
on JDK versions past JDK 8 and on all Android versions.