Guava 31.1 released, Google Java core library
Guava is a set of core libraries that includes new collection types (such as multimap and multiset), immutable collections, a graph library, functional types, an in-memory cache, and APIs/utilities for concurrency, I/O, hashing, primitives, reflection, string processing, and much more!
Guava comes in two flavors.
- The JRE flavor requires JDK 1.8 or higher.
- If you need support for JDK 1.7 or Android, use the Android flavor. You can find the Android Guava source in the
android
directory.
Guava 31.1 released.
Changelog
base
: Deprecated theThrowables
methodslazyStackTrace
andlazyStackTraceIsLazy
. They are no longer useful on any current platform. (6ebd7d8)collect
: Added a new methodImmutableMap.Builder.buildKeepingLast()
, which keeps the last value for any given key rather than throwing an exception when a key appears more than once. (68500b2)collect
: As a side-effect of thebuildKeepingLast()
change, the idiomImmutableList.copyOf(Maps.transformValues(map, function))
may produce different results iffunction
has side-effects. (This is not recommended.) (68500b2)hash
: AddedHashing.fingerprint2011()
. (13f703c)io
: ChangedByteStreams.nullOutputStream()
to follow the contract ofOutputStream.write
by throwing an exception if the range of bytes is out of bounds. (1cd85d0)net
: Added@CheckReturnValue
to the package (with a few exceptions). (a0e2577)net
: AddedHttpHeaders
constant forAccess-Control-Allow-Private-Network
. (6dabbdf)util.concurrent
: Added accumulate/update methods forAtomicDouble
andAtomicDoubleArray
. (2d875d3)
APIs promoted from @Beta
base
:Throwables
methodsgetCausalChain
andgetCauseAs
(dd462af)collect
:Streams
methodsmapWithIndex
andfindLast
(8079a29)collect
: the remaining methods inComparators
:min
,max
,lexicographical
,emptiesFirst
,emptiesLast
,isInOrder
,isInStrictOrder
(a3e411c)escape
: various APIs (468c68a)io
: various APIs inFiles
(828d9ee)net
: various APIs (261ac7a)reflect
: various APIs (9f6a384)testlib
: various APIs (93a8f02)util.concurrent
:AsyncCallable
,ListenableScheduledFuture
, andClosingFuture
(8b4ad17)util.concurrent
:ExecutionSequencer
,MoreExecutors.newSequentialExecutor
, andMonitor
(189d668)util.concurrent
:Futures
methods:submit
,submitAsync
,scheduleAsync
,nonCancellationPropagating
,inCompletionOrder
(e015172)util.concurrent
:Uninterruptibles
:awaitTerminationUninterruptibly
and theDuration
overloads in the class (825de9a)util.concurrent
: theFluentFuture
type, its factory methods, andaddCallback
(9c7e13b)