-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Release20
Chris Povirk edited this page Jul 13, 2018
·
10 revisions
- 20.0 was released on October 28, 2016.
- 20.0-rc1 was released on October 06, 2016.
(See ReleaseHistory.)
API documentation:
- If you see errors like "cannot access com.google.errorprone.annotations.CanIgnoreReturnValue," you can work around them by adding a local dependency on
error_prone_annotations
. (This problem is fixed in Guava 22 (but not 21), which makes that dependency present for users.) - For GWT, see another known issue under GWT notes.
Guava | Guava (GWT) | |
---|---|---|
Maven Identifier | com.google.guava:guava:20.0 | com.google.guava:guava-gwt:20.0 |
Jar | guava-20.0.jar | guava-gwt-20.0.jar |
Javadoc | guava-20.0-javadoc.jar | guava-gwt-20.0-javadoc.jar |
Sources | guava-20.0-sources.jar | guava-gwt-20.0-sources.jar |
See UseGuavaInYourBuild for help integrating Guava into your build environment.
-
Known issue: If you see
No source code is available for type java.lang.InterruptedException
, add<inherits name="java.lang.Lang"/>
to your.gwt.xml
. - Guava 20.0 requires GWT 2.8.0.
- Additionally, Guava 20.0 no longer works with the deprecated GWT "classic" Dev Mode. It continues to work with Super Dev Mode.
34+ issues are resolved in this release.
Full JDiff Report of changes since release 19.0.
New package! common.graph
common.graph
is a library for modeling graph-structured data, that is, entities and the relationships between them. Its purpose is to provide a common and extensible language for working with such data.
-
CharMatcher
constants have been deprecated in favor of the static factory methods that were added in 19.0. The constants will be removed after a 2-year deprecation cycle. -
Preconditions
: new overloads ofcheckNotNull
andcheckState
added to avoid varargs array allocation and primitive boxing for the most common argument combinations. -
Predicates
:assignableFrom(Class<?>)
deprecated and the correctly-named equivalentsubtypeOf(Class<?>)
added. -
Throwables
-
throwIfInstanceOf
andthrowIfUnchecked
added. -
propagate
,propagateIfInstanceOf
andpropagateIfPossible
deprecated.
-
-
ConcurrentHashMultiset
:create(MapMaker)
deprecated andcreate(ConcurrentMap)
added. -
FluentIterable
: a number of new static factory methods, such asconcat(Iterable)
andof()
added. -
Iterators
: deprecated methodemptyIterator()
removed. -
MapConstraints
: Most methods removed; the class was scheduled to be removed in this release, but full removal is pushed back. -
Maps
:subMap(NavigableMap, Range)
added. -
Ordering
:binarySearch
deprecated. -
RangeSet
:intersects(Range)
added. -
Sets
:subSet(NavigableSet, Range)
added. -
TreeTraverser
: factory methodusing(Function)
added to adapt a node -> childrenFunction
to aTreeTraverser
.
-
Hashing
: a number of new hash functions added, including FarmHash Fingerprint64 and a number of HMAC algorithms.
-
InputSupplier
andOutputSupplier
: removed. -
BaseEncoding
:canDecode(CharSequence)
added. -
ByteStreams
:exhaust(InputStream)
added. -
CharSource
:asByteSource(Charset)
added. -
CharStreams
:exhaust(Readable)
added.
Many additions, most related to statistics:
Quantiles
-
Stats
andStatsAccumulator
,PairedStats
andPairedStatsAccumulator
LinearTransformation
-
DoubleMath
:mean
methods deprecated in favor of usingStats
.
New methods added to IntMath
, LongMath
and DoubleMath
such as:
ceilingPowerOfTwo
isPrime
-
HostAndPort
:getHostText()
deprecated in favor of newgetHost()
method. -
HttpHeaders
andMediaType
: a number of new header/media type constants added.
-
ClassPath.ResourceInfo
:asByteSource()
andasCharSource(Charset)
methods added. -
TypeToken
:isAssignableFrom
methods removed (replaced byisSubtypeOf
in 19.0).
-
FutureFallback
: removed.-
Futures.withFallback
methods removed.
-
-
AsyncCallable
: added.-
Callables.asAsyncCallable(Callable, ListeningExecutorService)
added.
-
-
Futures.FutureCombiner
: added.-
Futures.whenAllComplete
andwhenAllSucceed
, returningFutureCombiner
, added.
-
-
AbstractFuture
:afterDone()
callback added. -
AtomicLongMap
:removeIfZero(K)
added. -
Futures
:-
get
methods taking an exceptionClass
removed; previously replaced withgetChecked
. -
transform
methods takingAsyncFunction
removed; previously replaced withtransformAsync
. -
getDone(Future)
added.
-
- Introduction
- Basic Utilities
- Collections
- Graphs
- Caches
- Functional Idioms
- Concurrency
- Strings
- Networking
- Primitives
- Ranges
- I/O
- Hashing
- EventBus
- Math
- Reflection
- Releases
- Tips
- Glossary
- Mailing List
- Stack Overflow
- Android Overview
- Footprint of JDK/Guava data structures