Uses of Annotation Type
com.google.common.annotations.GwtIncompatible
Packages that use GwtIncompatible
Package
Description
Basic utility libraries and interfaces.
Discouraged (in favor of Caffeine) caching utilities.
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.Concurrency utilities.
-
Uses of GwtIncompatible in com.google.common.base
Classes in com.google.common.base with annotations of type GwtIncompatibleModifier and TypeClassDescriptionfinal classThis class provides default values for all Java types, as defined by the JLS.final classUtility methods for working withEnuminstances.classPhantom reference with afinalizeReferent()method which a background thread invokes after the garbage collector reclaims the referent.interfaceImplemented by references that have code to run after garbage collection of their referents.classA reference queue with an associated background thread that dequeues references and invokesFinalizableReference.finalizeReferent()on them.classSoft reference with afinalizeReferent()method which a background thread invokes after the garbage collector reclaims the referent.classWeak reference with afinalizeReferent()method which a background thread invokes after the garbage collector reclaims the referent.enumRepresents a standard system property.Fields in com.google.common.base with annotations of type GwtIncompatibleModifier and TypeFieldDescriptionstatic final CharsetCharsets.US_ASCIIDeprecated.static final CharsetCharsets.UTF_16Deprecated.UseStandardCharsets.UTF_16instead.static final CharsetCharsets.UTF_16BEDeprecated.UseStandardCharsets.UTF_16BEinstead.static final CharsetCharsets.UTF_16LEDeprecated.UseStandardCharsets.UTF_16LEinstead.Methods in com.google.common.base with annotations of type GwtIncompatibleModifier and TypeMethodDescriptionstatic Predicate<CharSequence> Returns a predicate that evaluates totrueif theCharSequencebeing tested contains any match for the given regular expression pattern.static Predicate<CharSequence> Predicates.containsPattern(String pattern) Returns a predicate that evaluates totrueif theCharSequencebeing tested contains any match for the given regular expression pattern.Stopwatch.elapsed()Returns the current elapsed time shown on this stopwatch as aDuration.Throwables.getCauseAs(Throwable throwable, Class<X> expectedCauseType) Returnsthrowable's cause, cast toexpectedCauseType.static StringThrowables.getStackTraceAsString(Throwable throwable) Returns a string containing the result oftoString(), followed by the full, recursive stack trace ofthrowable.Predicates.instanceOf(Class<?> clazz) Returns a predicate that evaluates totrueif the object being tested is an instance of the given class.static List<StackTraceElement> Throwables.lazyStackTrace(Throwable throwable) Deprecated.This method is equivalent toThrowable.getStackTrace()on JDK versions past JDK 8 and on all Android versions.static booleanThrowables.lazyStackTraceIsLazy()Deprecated.This method always returns false on JDK versions past JDK 8 and on all Android versions.Suppliers.memoizeWithExpiration(Supplier<T> delegate, Duration duration) Returns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed.static SplitterReturns a splitter that considers any subsequence matchingpatternto be a separator.static SplitterReturns a splitter that considers any subsequence matching a given pattern (regular expression) to be a separator.static RuntimeExceptionDeprecated.To preserve behavior, usethrow eorthrow new RuntimeException(e)directly, or use a combination ofThrowables.throwIfUnchecked(java.lang.Throwable)andthrow new RuntimeException(e).static <X extends Throwable>
voidThrowables.propagateIfInstanceOf(@Nullable Throwable throwable, Class<X> declaredType) Deprecated.UseThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>), which has the same behavior but rejectsnull.static voidThrowables.propagateIfPossible(@Nullable Throwable throwable) Deprecated.UseThrowables.throwIfUnchecked(java.lang.Throwable), which has the same behavior but rejectsnull.static <X extends Throwable>
voidThrowables.propagateIfPossible(@Nullable Throwable throwable, Class<X> declaredType) Deprecated.Use a combination ofThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>)andThrowables.throwIfUnchecked(java.lang.Throwable), which togther provide the same behavior except that they rejectnull.Throwables.propagateIfPossible(@Nullable Throwable throwable, Class<X1> declaredType1, Class<X2> declaredType2) Deprecated.Use a combination of two calls toThrowables.throwIfInstanceOf(java.lang.Throwable, java.lang.Class<X>)and one call toThrowables.throwIfUnchecked(java.lang.Throwable), which togther provide the same behavior except that they rejectnull.Returns a predicate that evaluates totrueif the class being tested is assignable to (is a subtype of)clazz.static <X extends Throwable>
voidThrowables.throwIfInstanceOf(Throwable throwable, Class<X> declaredType) Throwsthrowableif it is an instance ofdeclaredType. -
Uses of GwtIncompatible in com.google.common.cache
Classes in com.google.common.cache with annotations of type GwtIncompatibleModifier and TypeClassDescriptionclassAbstractLoadingCache<K,V> This class provides a skeletal implementation of theCacheinterface to minimize the effort required to implement this interface.final classA specification of aCacheBuilderconfiguration.classForwardingCache<K,V> A cache which forwards all its method calls to another cache.classA cache which forwards all its method calls to another cache.final classA collection of common removal listeners.Methods in com.google.common.cache with annotations of type GwtIncompatibleModifier and TypeMethodDescriptionstatic <K,V> CacheLoader <K, V> CacheLoader.asyncReloading(CacheLoader<K, V> loader, Executor executor) Returns aCacheLoaderwhich wrapsloader, executing calls toCacheLoader.reload(K, V)usingexecutor.CacheBuilder.expireAfterAccess(Duration duration) Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last access.CacheBuilder.expireAfterWrite(Duration duration) Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.static CacheBuilder<Object, Object> CacheBuilder.from(CacheBuilderSpec spec) Constructs a newCacheBuilderinstance with the settings specified inspec.static CacheBuilder<Object, Object> Constructs a newCacheBuilderinstance with the settings specified inspec.CacheBuilder.maximumWeight(long maximumWeight) Specifies the maximum weight of entries the cache may contain.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.CacheBuilder.refreshAfterWrite(Duration duration) 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.Computes or retrieves a replacement value corresponding to an already-cachedkey.CacheBuilder.softValues()Specifies that each value (not key) stored in the cache should be wrapped in aSoftReference(by default, strong references are used).CacheBuilder.weakKeys()Specifies that each key (not value) stored in the cache should be wrapped in aWeakReference(by default, strong references are used).CacheBuilder.weakValues()Specifies that each value (not key) stored in the cache should be wrapped in aWeakReference(by default, strong references are used).<K1 extends K, V1 extends V>
CacheBuilder<K1, V1> Specifies the weigher to use in determining the weight of entries. -
Uses of GwtIncompatible in com.google.common.collect
Classes in com.google.common.collect with annotations of type GwtIncompatibleModifier and TypeClassDescriptionfinal classA multiset that supports concurrent modifications and that provides atomic versions of mostMultisetoperations (exceptions where noted).classDeprecated.This class has moved tocom.google.common.util.concurrent.classForwardingDeque<E extends @Nullable Object>A deque which forwards all its method calls to another deque.classForwardingNavigableMap<K extends @Nullable Object, V extends @Nullable Object>A navigable map which forwards all its method calls to another navigable map.classForwardingNavigableSet<E extends @Nullable Object>A navigable set which forwards all its method calls to another navigable set.final classAClassToInstanceMapwhose contents will never change, with many other important properties detailed atImmutableCollection.classImmutableRangeMap<K extends Comparable<?>, V>ARangeMapwhose contents will never change, with many other important properties detailed atImmutableCollection.final classImmutableRangeSet<C extends Comparable>ARangeSetwhose contents will never change, with many other important properties detailed atImmutableCollection.classASortedMultisetwhose contents will never change, with many other important properties detailed atImmutableCollection.interfaceInterner<E>Provides similar behavior toString.intern()for any immutable type.final classContains static methods pertaining to instances ofInterner.final classMutableClassToInstanceMap<B extends @Nullable Object>A mutable class-to-instance map backed by an arbitrary user-provided map.interfaceRangeMap<K extends Comparable, V>A mapping from disjoint nonempty ranges to non-null values.interfaceRangeSet<C extends Comparable>final classTreeRangeMap<K extends Comparable, V>An implementation ofRangeMapbased on aTreeMap, supporting all optional operations.classTreeRangeSet<C extends Comparable<?>>Methods in com.google.common.collect with annotations of type GwtIncompatibleModifier and TypeMethodDescriptionstatic <K extends @Nullable Object, V extends @Nullable Object>
NavigableMap<K, V> Maps.asMap(NavigableSet<K> set, Function<? super K, V> function) Returns a view of the navigable set as a map, mapping keys from the set according to the specified function.Sets.complementOf(Collection<E> collection) Creates anEnumSetconsisting of all enum values that are not in the specified collection.Sets.complementOf(Collection<E> collection, Class<E> type) Creates anEnumSetconsisting of all enum values that are not in the specified collection.Returns a new array that contains the concatenated contents of two arrays.abstract UnmodifiableIterator<E> ImmutableSortedSet.descendingIterator()ImmutableSortedSet.descendingSet()static <E> intQueues.drain(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, long timeout, TimeUnit unit) Drains the queue asBlockingQueue.drainTo(Collection, int), but if the requestednumElementselements are not available, it will wait for them up to the specified timeout.static <E> intQueues.drain(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, Duration timeout) Drains the queue asBlockingQueue.drainTo(Collection, int), but if the requestednumElementselements are not available, it will wait for them up to the specified timeout.static <E> intQueues.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> intQueues.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.final <T> FluentIterable<T> Returns the elements from this fluent iterable that are instances of classtype.static <T> Iterable<T> Returns a view ofunfilteredcontaining all elements that are of the typedesiredType.static <T> UnmodifiableIterator<T> Returns a view ofunfilteredcontaining all elements that are of the typedesiredType.static <E extends @Nullable Object>
NavigableSet<E> Sets.filter(NavigableSet<E> unfiltered, Predicate<? super E> predicate) Returns the elements of aNavigableSet,unfiltered, that satisfy a predicate.static <K extends @Nullable Object, V extends @Nullable Object>
NavigableMap<K, V> Maps.filterEntries(NavigableMap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a sorted map containing the mappings inunfilteredthat satisfy a predicate.static <K extends @Nullable Object, V extends @Nullable Object>
NavigableMap<K, V> Maps.filterKeys(NavigableMap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a navigable map containing the mappings inunfilteredwhose keys satisfy a predicate.static <K extends @Nullable Object, V extends @Nullable Object>
NavigableMap<K, V> Maps.filterValues(NavigableMap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a navigable map containing the mappings inunfilteredwhose values satisfy a predicate.static ImmutableMap<String, String> Maps.fromProperties(Properties properties) Creates anImmutableMap<String, String>from aPropertiesinstance.EnumBiMap.keyType()Returns the associated key type.EnumHashBiMap.keyType()Returns the associated key type.Returns a new array of the given length with the specified component type.static <E> ArrayBlockingQueue<E> Queues.newArrayBlockingQueue(int capacity) Creates an emptyArrayBlockingQueuewith 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 aConcurrentLinkedQueuecontaining the elements of the specified iterable, in the order they are returned by the iterable's iterator.static <E extends @Nullable Object>
CopyOnWriteArrayList<E> Lists.newCopyOnWriteArrayList()Creates an emptyCopyOnWriteArrayListinstance.static <E extends @Nullable Object>
CopyOnWriteArrayList<E> Lists.newCopyOnWriteArrayList(Iterable<? extends E> elements) Creates aCopyOnWriteArrayListinstance containing the given elements.static <E extends @Nullable Object>
CopyOnWriteArraySet<E> Sets.newCopyOnWriteArraySet()Creates an emptyCopyOnWriteArraySetinstance.static <E extends @Nullable Object>
CopyOnWriteArraySet<E> Sets.newCopyOnWriteArraySet(Iterable<? extends E> elements) Creates aCopyOnWriteArraySetinstance containing the given elements.static <E> LinkedBlockingDeque<E> Queues.newLinkedBlockingDeque()Creates an emptyLinkedBlockingDequewith a capacity ofInteger.MAX_VALUE.static <E> LinkedBlockingDeque<E> Queues.newLinkedBlockingDeque(int capacity) Creates an emptyLinkedBlockingDequewith the given (fixed) capacity.static <E> LinkedBlockingDeque<E> Queues.newLinkedBlockingDeque(Iterable<? extends E> elements) Creates aLinkedBlockingDequewith 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 emptyLinkedBlockingQueuewith a capacity ofInteger.MAX_VALUE.static <E> LinkedBlockingQueue<E> Queues.newLinkedBlockingQueue(int capacity) Creates an emptyLinkedBlockingQueuewith the given (fixed) capacity.static <E> LinkedBlockingQueue<E> Queues.newLinkedBlockingQueue(Iterable<? extends E> elements) Creates aLinkedBlockingQueuewith 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 emptyPriorityBlockingQueuewith the ordering given by its elements' natural ordering.static <E extends Comparable>
PriorityBlockingQueue<E> Queues.newPriorityBlockingQueue(Iterable<? extends E> elements) Creates aPriorityBlockingQueuecontaining the given elements.static <E> SynchronousQueue<E> Queues.newSynchronousQueue()Creates an emptySynchronousQueuewith nonfair access policy.static <E> Interner<E> Interners.newWeakInterner()Returns a new thread-safe interner which retains a weak reference to each instance it has interned, and so does not prevent these instances from being garbage-collected.ImmutableSortedSet.pollFirst()Deprecated.Unsupported operation.ImmutableSortedSet.pollLast()Deprecated.Unsupported operation.static <K extends Comparable<? super K>, V extends @Nullable Object>
NavigableMap<K, V> Maps.subMap(NavigableMap<K, V> map, Range<K> range) Returns a view of the portion ofmapwhose keys are contained byrange.static <K extends Comparable<? super K>>
NavigableSet<K> Sets.subSet(NavigableSet<K> set, Range<K> range) Returns a view of the portion ofsetwhose elements are contained byrange.static <K extends @Nullable Object, V extends @Nullable Object>
NavigableMap<K, V> Maps.synchronizedNavigableMap(NavigableMap<K, V> navigableMap) Returns a synchronized (thread-safe) navigable map backed by the specified navigable map.static <E extends @Nullable Object>
NavigableSet<E> Sets.synchronizedNavigableSet(NavigableSet<E> navigableSet) Returns a synchronized (thread-safe) navigable set backed by the specified navigable set.Returns a two-dimensional array with the table contents.final E[]Returns an array containing all of the elements from this fluent iterable in iteration order.Copies an iterable's elements into an array.Copies an iterator's elements into an array.static <K extends @Nullable Object, V1 extends @Nullable Object, V2 extends @Nullable Object>
NavigableMap<K, V2> Maps.transformEntries(NavigableMap<K, V1> fromMap, Maps.EntryTransformer<? super K, ? super V1, V2> transformer) Returns a view of a navigable map whose values are derived from the original navigable map's entries.static <K extends @Nullable Object, V1 extends @Nullable Object, V2 extends @Nullable Object>
NavigableMap<K, V2> Maps.transformValues(NavigableMap<K, V1> fromMap, Function<? super V1, V2> function) Returns a view of a navigable map where each value is transformed by a function.static <K extends @Nullable Object, V extends @Nullable Object>
NavigableMap<K, V> Maps.unmodifiableNavigableMap(NavigableMap<K, ? extends V> map) Returns an unmodifiable view of the specified navigable map.EnumBiMap.valueType()Returns the associated value type.Interners.InternerBuilder.weak()Instructs theInterners.InternerBuilderto build a weak interner.MapMaker.weakKeys()Specifies that each key (not value) stored in the map should be wrapped in aWeakReference(by default, strong references are used).MapMaker.weakValues()Specifies that each value (not key) stored in the map should be wrapped in aWeakReference(by default, strong references are used). -
Uses of GwtIncompatible in com.google.common.io
Classes in com.google.common.io with annotations of type GwtIncompatibleModifier and TypeInterfaceDescriptioninterfaceAn extension ofDataInputfor reading from in-memory byte arrays; its methods offer identical functionality but do not throwIOException.interfaceAn extension ofDataOutputfor writing to in-memory byte arrays; its methods offer identical functionality but do not throwIOException.interfaceByteProcessor<T extends @Nullable Object>A callback interface to process bytes from a stream.classA destination to which bytes can be written, such as a file.classA readable source of bytes, such as a file.final classProvides utility methods for working with byte arrays and I/O streams.classA destination to which characters can be written, such as a text file.classA readable source of characters, such as a text file.final classProvides utility methods for working with character streams.final classUtility methods for working withCloseableobjects.final classfinal classAnInputStreamthat counts the number of bytes read.final classAn OutputStream that counts the number of bytes written.final classAnOutputStreamthat starts buffering to a byte array, but switches to file buffering once the data reaches a configurable size.final classProvides utility methods for working with files.enumModes for opening a file for writing.final classUtility methods for working withFlushableobjects.final classException 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.,SecureDirectoryStreamis not supported).interfaceLineProcessor<T extends @Nullable Object>A callback to be used with the streamingreadLinesmethods.final classA class for reading lines of text.final classAn implementation ofDataInputthat uses little-endian byte ordering for readingshort,int,float,double, andlongvalues.final classAn implementation ofDataOutputthat uses little-endian byte ordering for writingchar,short,int,float,double, andlongvalues.final classfinal classFile name filter that only accepts files matching a regular expression.enumOptions 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 classProvides utility methods for working with resources in the classpath.Methods in com.google.common.io with annotations of type GwtIncompatibleModifier and TypeMethodDescriptionfinal ByteSourceBaseEncoding.decodingSource(CharSource encodedSource) Returns aByteSourcethat reads base-encoded bytes from the specifiedCharSource.abstract InputStreamBaseEncoding.decodingStream(Reader reader) Returns anInputStreamthat decodes base-encoded input from the specifiedReader.final ByteSinkBaseEncoding.encodingSink(CharSink encodedSink) Returns aByteSinkthat writes base-encoded bytes to the specifiedCharSink.abstract OutputStreamBaseEncoding.encodingStream(Writer writer) Returns anOutputStreamthat encodes bytes using this encoding into the specifiedWriter. -
Uses of GwtIncompatible in com.google.common.math
Classes in com.google.common.math with annotations of type GwtIncompatibleModifier and TypeClassDescriptionclassA class for arithmetic onBigDecimalthat is not covered by its built-in methods.classThe representation of a linear transformation between real numbersxandy.final classAn immutable value object capturing some basic statistics about a collection of paired double values (e.g. points on a plane).final classA mutable object which accumulates paired double values (e.g. points on a plane) and tracks some basic statistics over all the values added so far.final classProvides a fluent API for calculating quantiles.final classA 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 classA mutable object which accumulates double values and tracks some basic statistics over all the values added so far.Methods in com.google.common.math with annotations of type GwtIncompatibleModifier and TypeMethodDescriptionstatic longLongMath.checkedPow(long b, int k) Returns thebto thekth power, provided it does not overflow.static BigIntegerBigIntegerMath.divide(BigInteger p, BigInteger q, RoundingMode mode) Returns the result of dividingpbyq, rounding using the specifiedRoundingMode.static longLongMath.divide(long p, long q, RoundingMode mode) Returns the result of dividingpbyq, rounding using the specifiedRoundingMode.static longLongMath.factorial(int n) Returnsn!, that is, the product of the firstnpositive integers,1ifn == 0, orLong.MAX_VALUEif the result does not fit in along.static booleanDoubleMath.isMathematicalInteger(double x) Returnstrueifxrepresents a mathematical integer.static booleanDoubleMath.isPowerOfTwo(double x) Returnstrueifxis exactly equal to2^kfor some finite integerk.static booleanIntMath.isPrime(int n) Returnstrueifnis a prime number: an integer greater than one that cannot be factored into a product of smaller positive integers.static booleanLongMath.isPrime(long n) Returnstrueifnis a prime number: an integer greater than one that cannot be factored into a product of smaller positive integers.static intBigIntegerMath.log10(BigInteger x, RoundingMode mode) Returns the base-10 logarithm ofx, rounded according to the specified rounding mode.static intIntMath.log10(int x, RoundingMode mode) Returns the base-10 logarithm ofx, rounded according to the specified rounding mode.static intLongMath.log10(long x, RoundingMode mode) Returns the base-10 logarithm ofx, rounded according to the specified rounding mode.static intDoubleMath.log2(double x, RoundingMode mode) Returns the base 2 logarithm of a double value, rounded with the specified rounding mode to anint.static doubleDoubleMath.mean(double... values) Deprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)instead, noting the less strict handling of non-finite values.static doubleDeprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)instead, noting the less strict handling of non-finite values.static doubleDeprecated.UseStats.meanOf(java.lang.Iterable<? extends java.lang.Number>)instead, noting the less strict handling of non-finite values.static intLongMath.mod(long x, int m) Returnsx mod m, a non-negative value less thanm.static longLongMath.mod(long x, long m) Returnsx mod m, a non-negative value less thanm.static intIntMath.pow(int b, int k) Returnsbto thekth power.static longLongMath.pow(long b, int k) Returnsbto thekth power.static BigIntegerDoubleMath.roundToBigInteger(double x, RoundingMode mode) Returns theBigIntegervalue that is equal toxrounded with the specified rounding mode, if possible.static doubleBigIntegerMath.roundToDouble(BigInteger x, RoundingMode mode) Returnsx, rounded to adoublewith the specified rounding mode.static doubleLongMath.roundToDouble(long x, RoundingMode mode) Returnsx, rounded to adoublewith the specified rounding mode.static intDoubleMath.roundToInt(double x, RoundingMode mode) Returns theintvalue that is equal toxrounded with the specified rounding mode, if possible.static longDoubleMath.roundToLong(double x, RoundingMode mode) Returns thelongvalue that is equal toxrounded with the specified rounding mode, if possible.static BigIntegerBigIntegerMath.sqrt(BigInteger x, RoundingMode mode) Returns the square root ofx, rounded with the specified rounding mode.static intIntMath.sqrt(int x, RoundingMode mode) Returns the square root ofx, rounded with the specified rounding mode.static longLongMath.sqrt(long x, RoundingMode mode) Returns the square root ofx, rounded with the specified rounding mode. -
Uses of GwtIncompatible in com.google.common.net
Classes in com.google.common.net with annotations of type GwtIncompatibleModifier and TypeClassDescriptionfinal classA syntactically valid host specifier, suitable for use in a URI.final classStatic utility methods pertaining toInetAddressinstances. -
Uses of GwtIncompatible in com.google.common.primitives
Classes in com.google.common.primitives with annotations of type GwtIncompatibleModifier and TypeClassDescriptionfinal classStatic utility methods pertaining tobyteprimitives that interpret values as unsigned (that is, any negative valuebis treated as the positive value256 + b).Methods in com.google.common.primitives with annotations of type GwtIncompatibleModifier and TypeMethodDescriptionstatic charChars.fromByteArray(byte[] bytes) Returns thecharvalue whose big-endian representation is stored in the first 2 bytes ofbytes; equivalent toByteBuffer.wrap(bytes).getChar().static shortShorts.fromByteArray(byte[] bytes) Returns theshortvalue whose big-endian representation is stored in the first 2 bytes ofbytes; equivalent toByteBuffer.wrap(bytes).getShort().static charChars.fromBytes(byte b1, byte b2) Returns thecharvalue whose byte representation is the given 2 bytes, in big-endian order; equivalent toChars.fromByteArray(new byte[] {b1, b2}).static shortShorts.fromBytes(byte b1, byte b2) Returns theshortvalue whose byte representation is the given 2 bytes, in big-endian order; equivalent toShorts.fromByteArray(new byte[] {b1, b2}).static doubleDoubles.max(double... array) Returns the greatest value present inarray, using the same rules of comparison asMath.max(double, double).static floatFloats.max(float... array) Returns the greatest value present inarray, using the same rules of comparison asMath.max(float, float).static intInts.max(int... array) Returns the greatest value present inarray.static shortShorts.max(short... array) Returns the greatest value present inarray.static doubleDoubles.min(double... array) Returns the least value present inarray, using the same rules of comparison asMath.min(double, double).static floatFloats.min(float... array) Returns the least value present inarray, using the same rules of comparison asMath.min(float, float).static intInts.min(int... array) Returns the least value present inarray.static shortShorts.min(short... array) Returns the least value present inarray.UnsignedInteger.times(UnsignedInteger val) Returns the result of multiplying this andval.static byte[]Chars.toByteArray(char value) Returns a big-endian representation ofvaluein a 2-element byte array; equivalent toByteBuffer.allocate(2).putChar(value).array().static byte[]Shorts.toByteArray(short value) Returns a big-endian representation ofvaluein a 2-element byte array; equivalent toByteBuffer.allocate(2).putShort(value).array().Parses the specified string as a double-precision floating point value.Parses the specified string as a single-precision floating point value. -
Uses of GwtIncompatible in com.google.common.util.concurrent
Classes in com.google.common.util.concurrent with annotations of type GwtIncompatibleModifier and TypeClassDescriptionclassBase class for services that can implementAbstractExecutionThreadService.startUp(),AbstractExecutionThreadService.run()andAbstractExecutionThreadService.shutDown()methods.classBase class for services that do not need a thread while "running" but may need one during startup and shutdown.classAbstractListeningExecutorServiceimplementation that createsListenableFutureinstances for eachRunnableandCallablesubmitted to it.classBase class for services that can implementAbstractScheduledService.startUp()andAbstractScheduledService.shutDown()but while in the "running" state need to perform a periodic task.classBase class for implementing services that can handleAbstractService.doStart()andAbstractService.doStop()requests, responding to them withAbstractService.notifyStarted()andAbstractService.notifyStopped()callbacks.classAdoublevalue that may be updated atomically.classAdoublearray in which elements may be updated atomically.final classStatic utility methods pertaining to classes in thejava.util.concurrent.atomicpackage.final classClosingFuture<V extends @Nullable Object>A step in a pipeline of an asynchronous computation.classTheCycleDetectingLockFactorycreatesReentrantLockinstances andReentrantReadWriteLockinstances that detect potential deadlock by checking for cycles in lock acquisition order.final classA support class forListenableFutureimplementations to manage their listeners.final classSerializes execution of tasks, somewhat like an "asynchronoussynchronizedblock."final classA TimeLimiter implementation which actually does not attempt to limit time at all.classABlockingDequewhich forwards all its method calls to anotherBlockingDeque.classABlockingQueuewhich forwards all its method calls to anotherBlockingQueue.classAn executor service which forwards all its method calls to another executor service.classA listening executor service which forwards all its method calls to another listening executor service.final classUtilities necessary for working with libraries that supply plainFutureinstances.classListenableFutureTask<V extends @Nullable Object>AFutureTaskthat also implements theListenableFutureinterface.interfaceAnExecutorServicethat returnsListenableFutureinstances.interfaceAScheduledExecutorServicethat returnsListenableFutureinstances from itsExecutorServicemethods.final classA synchronization abstraction supporting waiting on arbitrary boolean conditions.classA rate limiter.interfaceAn object with an operational state, plus asynchronousService.startAsync()andService.stopAsync()lifecycle methods to transition between states.final classA manager for monitoring and controlling a set of services.final classA TimeLimiter that runs method calls in the background using anExecutorService.classStriped<L>A stripedLock/Semaphore/ReadWriteLock.final classA 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 factoryinterfaceImposes a time limit on method calls.final classFactories forThread.UncaughtExceptionHandlerinstances.classUnchecked version ofTimeoutException.Methods in com.google.common.util.concurrent with annotations of type GwtIncompatibleModifier and TypeMethodDescriptionstatic voidMoreExecutors.addDelayedShutdownHook(ExecutorService service, long terminationTimeout, TimeUnit timeUnit) Add a shutdown hook to wait for thread completion in the givenservice.static voidMoreExecutors.addDelayedShutdownHook(ExecutorService service, Duration terminationTimeout) Add a shutdown hook to wait for thread completion in the givenservice.static <T extends @Nullable Object>
AsyncCallable<T> Callables.asAsyncCallable(Callable<T> callable, ListeningExecutorService listeningExecutorService) Creates anAsyncCallablefrom aCallable.static voidUninterruptibles.awaitTerminationUninterruptibly(ExecutorService executor) Invokesexecutor.awaitTermination(long, TimeUnit)uninterruptibly with no timeout.static booleanUninterruptibles.awaitTerminationUninterruptibly(ExecutorService executor, long timeout, TimeUnit unit) Invokesexecutor.awaitTermination(long, TimeUnit)uninterruptibly.static booleanUninterruptibles.awaitTerminationUninterruptibly(ExecutorService executor, Duration timeout) Invokesexecutor.awaitTermination(long, TimeUnit)uninterruptibly.static voidUninterruptibles.awaitUninterruptibly(CountDownLatch latch) Invokeslatch.await()uninterruptibly.static booleanUninterruptibles.awaitUninterruptibly(CountDownLatch latch, long timeout, TimeUnit unit) Invokeslatch.await(timeout, unit)uninterruptibly.static booleanUninterruptibles.awaitUninterruptibly(CountDownLatch latch, Duration timeout) Invokeslatch.await(timeout, unit)uninterruptibly.static booleanUninterruptibles.awaitUninterruptibly(Condition condition, long timeout, TimeUnit unit) Invokescondition.await(timeout, unit)uninterruptibly.static booleanUninterruptibles.awaitUninterruptibly(Condition condition, Duration timeout) Invokescondition.await(timeout, unit)uninterruptibly.Futures.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.Futures.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.Futures.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 ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor, Duration terminationTimeout) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor, Duration terminationTimeout) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.Uninterruptibles.getUninterruptibly(Future<V> future, long timeout, TimeUnit unit) Invokesfuture.get(timeout, unit)uninterruptibly.Uninterruptibles.getUninterruptibly(Future<V> future, Duration timeout) Invokesfuture.get(timeout, unit)uninterruptibly.static voidUninterruptibles.joinUninterruptibly(Thread toJoin) InvokestoJoin.join()uninterruptibly.static voidUninterruptibles.joinUninterruptibly(Thread toJoin, long timeout, TimeUnit unit) Invokesunit.timedJoin(toJoin, timeout)uninterruptibly.static voidUninterruptibles.joinUninterruptibly(Thread toJoin, Duration timeout) Invokesunit.timedJoin(toJoin, timeout)uninterruptibly.Futures.lazyTransform(Future<I> input, Function<? super I, ? extends O> function) LikeFutures.transform(ListenableFuture, Function, Executor)except that the transformationfunctionis invoked on each call toget()on the returned future.static ListeningExecutorServiceMoreExecutors.listeningDecorator(ExecutorService delegate) Creates anExecutorServicewhosesubmitandinvokeAllmethods submitListenableFutureTaskinstances to the given delegate executor.MoreExecutors.listeningDecorator(ScheduledExecutorService delegate) Creates aScheduledExecutorServicewhosesubmitandinvokeAllmethods submitListenableFutureTaskinstances to the given delegate executor.static ListeningExecutorServiceMoreExecutors.newDirectExecutorService()Creates an executor service that runs each task in the thread that invokesexecute/submit, as inThreadPoolExecutor.CallerRunsPolicy.static ExecutorMoreExecutors.newSequentialExecutor(Executor delegate) Returns anExecutorthat runs each task executed sequentially, such that no two tasks are running concurrently.static ThreadFactoryMoreExecutors.platformThreadFactory()Returns a default thread factory used to create new threads.static <E> voidUninterruptibles.putUninterruptibly(BlockingQueue<E> queue, E element) Invokesqueue.put(element)uninterruptibly.static <O extends @Nullable Object>
ListenableFuture<O> Futures.scheduleAsync(AsyncCallable<O> callable, long delay, TimeUnit timeUnit, ScheduledExecutorService executorService) Schedulescallableon the specifiedexecutor, returning aFuture.static <O extends @Nullable Object>
ListenableFuture<O> Futures.scheduleAsync(AsyncCallable<O> callable, Duration delay, ScheduledExecutorService executorService) Schedulescallableon the specifiedexecutor, returning aFuture.static booleanMoreExecutors.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 booleanMoreExecutors.shutdownAndAwaitTermination(ExecutorService service, Duration timeout) Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static voidUninterruptibles.sleepUninterruptibly(long sleepFor, TimeUnit unit) Invokesunit.sleep(sleepFor)uninterruptibly.static voidUninterruptibles.sleepUninterruptibly(Duration sleepFor) Invokesunit.sleep(sleepFor)uninterruptibly.static <E> EUninterruptibles.takeUninterruptibly(BlockingQueue<E> queue) Invokesqueue.take()uninterruptibly.static booleanUninterruptibles.tryAcquireUninterruptibly(Semaphore semaphore, int permits, long timeout, TimeUnit unit) Invokessemaphore.tryAcquire(permits, timeout, unit)uninterruptibly.static booleanUninterruptibles.tryAcquireUninterruptibly(Semaphore semaphore, int permits, Duration timeout) Invokessemaphore.tryAcquire(permits, timeout, unit)uninterruptibly.static booleanUninterruptibles.tryAcquireUninterruptibly(Semaphore semaphore, long timeout, TimeUnit unit) Invokessemaphore.tryAcquire(1, timeout, unit)uninterruptibly.static booleanUninterruptibles.tryAcquireUninterruptibly(Semaphore semaphore, Duration timeout) Invokessemaphore.tryAcquire(1, timeout, unit)uninterruptibly.static booleanUninterruptibles.tryLockUninterruptibly(Lock lock, long timeout, TimeUnit unit) Invokeslock.tryLock(timeout, unit)uninterruptibly.static booleanUninterruptibles.tryLockUninterruptibly(Lock lock, Duration timeout) Invokeslock.tryLock(timeout, unit)uninterruptibly.final FluentFuture<V> FluentFuture.withTimeout(long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutExceptionwrapped 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 aTimeoutExceptionwrapped in anExecutionException) if the specified timeout expires.static <V extends @Nullable Object>
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 aTimeoutExceptionwrapped in anExecutionException) if the specified duration expires.static <V extends @Nullable Object>
ListenableFuture<V> Futures.withTimeout(ListenableFuture<V> delegate, Duration time, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to another but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified duration expires.
StandardCharsets.US_ASCIIinstead.