Guava Release 20.0: Release Notes
- 20.0 was released on October 28, 2016.
- 20.0-rc1 was released on October 06, 2016.
(See [[ReleaseHistory]].)
API documentation:
Using Guava in your project
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.
GWT notes
- 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.
Issues resolved
34+ issues are resolved in this release.
API Changes
Full JDiff Report of changes since release 19.0.
Significant API additions and changes
New package! [[common.graph|GraphsExplained]]
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.
common.base
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.
common.collect
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
.
common.hash
Hashing
: a number of new hash functions added, including FarmHash Fingerprint64 and a number of HMAC algorithms.
common.io
InputSupplier
andOutputSupplier
: removed.BaseEncoding
:canDecode(CharSequence)
added.ByteStreams
:exhaust(InputStream)
added.CharSource
:asByteSource(Charset)
added.CharStreams
:exhaust(Readable)
added.
common.math
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
common.net
HostAndPort
:getHostText()
deprecated in favor of newgetHost()
method.HttpHeaders
andMediaType
: a number of new header/media type constants added.
common.reflect
ClassPath.ResourceInfo
:asByteSource()
andasCharSource(Charset)
methods added.TypeToken
:isAssignableFrom
methods removed (replaced byisSubtypeOf
in 19.0).
common.util.concurrent
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.