JoinableExecutorService
: A new class in theconcurrent
package that enhances a standardExecutorService
with the ability for the calling thread to join task execution. This service allows threads to submit groups of tasks and then participate directly in executing those tasks, aiding in faster completion and improved resource utilization. It ensures tasks are initiated in iteration order but balances task execution across groups to maintain consistent system performance. This feature is beneficial for applications requiring high throughput and dynamic task management.
- Fixed a bug that caused some methods in
Sequences
to have poor performance if thetoString
method of a potentialSequence
was computationally expensive
- Fixed a bug that caused a
NoSuchMethodException
to be thrown when using theReflection
utility tocall
a non-overriden interface-defined default method.
- Added the
ByteBuffers#share
method that returns a new ByteBuffer containing a shared subseqence of a sourceByteBuffer
while incrementing theposition
of the source the same number of bytes that are shared. - Upgraded
logback
dependency to version1.2.11
- Fixed a bug in
Reflection#call
that threw aNoSuchMethodException
when trying to call an overriden method that accepts a generic parameter.
- Improved the performance of
CountUpLatch
by using better synchronization control. - Fixed a bug in
AnyStrings#tryParseNumber
that caused an error to be thrown instead of returningnull
when parsing strings with a leadingE
ore
followed by digit characters (e.g.e45
). These strings were mistaken for a number in scientific notation, but the parser has been fixed so that error no longer occurs. - Optimized
ByteBuffers#getByteArray
to return the backing array of aByteBuffer
if it exists and the position of theByteBuffer
is0
as well as the number of bytesremaining
being equal to itscapacity
.
- Fixed a bug that made it possible for the
ByteBuffer
returend fromByteBuffers#get(ByteBuffer int)
to have a different byte order than the input source. - Deprecated
ByteBuffers#encodeAsHex
in favor ofByteBuffers#encodeAsHexString
. - Deprecated
ByteBuffers#decodeFromHex
in favor ofByteBuffers#decodeFromHexString
.
- Added the
TriConsumer
functional interface that is similar toBiConsumer
for three input arguments.
- Added an improvement to
LazyTransformSet
that caches previously transformed values and makes a best effort to keep them from being transformed on subsequent iterations. - Added an
ExecutorRaceService
that can be used to execute multiple tasks in parallel with the option to give one of the tasks a head start. The first of the tasks to complete has itsFuture
returned to the caller. - Added the
Multimaps#from
method that transforms aMap
whose values are aSet
of objects into aMultimap
.
- Added the
CoalescableTreeMap
data structure that contains acoalesce
method to return values for a consecutive range of similar keys.
- Fixed a bug that caused
Sequences#isSequence
to throw aNullPointerException
when checking anull
reference. This method will now returnfalse
when provided anull
parameter.
- Fixed a bug that caused
AnyStrings#join
to throw anIndexOutOfBoundsException
when trying to join an empty array of arguments with a separator. These functions now correctly return an empty string.
- Fixed a bug that caused a
StringSplitter
to throw anIllegalStateException
whentoArray()
would generate an empty array because the combination of the original input and split options did not produce any distinct tokens (i.e. usingSplitOption.TRIM_WHITESPACE
with an empty string input).
- Added a version of
AnyObjects#split
that takes aStringSplitter
as a parameter to provide more configurable split functionality.
- Added
Benchmark#average
method that runs an action for a specified number of rounds and returns the average run time. - Added a
CountUpLatch
synchronization construct to allow threads to wait until a latch has been incremented at leastn
times; even ifn
isn't known until after the incrementation begins. - Added the
AnyObjects#split
functions to split thetoString()
representation of anObject
or aSequence
of Objects by a delimiter; ultimately producing a flattened list of all the delimited substrings.
- Fix a bug that causes the
WrapperAwareStringSplitter
to incorrectly split a string by a delimiter within a wrapped character sequence if there was no instance of the delimiter character appearing before the wrapped characters.
- Added a
WrapperAwareStringSplitter
that can be used to split strings on a delimiter except for when that delimiter appears within a character sequence that is wrapped by two specified characters (i.e. beginning and ending parenthesis or left and right brackets).
- Fixed a bug in
Reflection#getTypeArguments
that erroneously returned an empty collection of type arguments when a field was parameterized with a type that itself had a parameterized type (i.e.List<AtomicReference<Integer>>
) - Fixed a bug in
Reflection#getTypeArguments
that caused only a subset of type arguments to be returned in a field contained multiple type arguments, some of which were the same type (i.e.Map<Integer, Integer>
).
- Added the
com.cinchapi.script.ScriptObjectMirrors
utility class which contains thejavaify
method for casting script objects to their native Java counterparts. - Added
com.cinchapi.common.collect.lazy
package which contains collections that facilitate efficient streaming by executing transformation logic on the fly. The package containsLazyTransformSet
- aSet
that transforms items from another set using a function. The transformation only happens at the point of consumption.
- Added
Reflection#getAllDeclaredMethods
to returnMethod
objects for all the non-base methods declared in a class hiearchy.
- Fixed a bug in
AnyStrings#isWithinQuotes
that failed to account for all classes of unicode quote characters. - Added functionality to
AnyStrings#replaceUnicodeConfusables
to specify characters that should not be replaced, even if they are a confusable. - Added functionality to
AnyStrings#isWithinQuotes
to specify characters that should not be treated as quote characters, even if they actually are.
- Fixed a bug where the
Reflection#getMethod
and other dependent functions (i.e.call
,callStatic
, etc) incorrectly determined an invocation was ambiguous if the invoked method was overloaded with corresponding parameters that are autoboxable (i.e.long
andLong
). For example, trying to invoke one offoo(String arg1, long arg2)
andfoo(String arg1, Long arg2)
would previously fail.
- Fixed a bug that caused an
ArrayBuilder
to fail when adding elements with different types even though those types had a common ancestor type. - Fixed a bug that caused issues when using
Reflection
to determine the callability of or to invoke methods with a varargs parameter.
- Added the
Types
utility class which contains functions to coerce objects to a specific type.
- Added
Reflection#isCallableWith
that tests whether aMethod
is callable with an array of parameters. - Added
ByteBuffers#getByteArray
and deprecatedByteBuffers#toByteArray
because the implementation of the latter is incorrect when theByteBuffer
is backed by an array.
- Added the
Continuation
data structure, which is an infiniteList
whose elements are generated on the fly using aFunction
orSupplier
. When an element at an index is generated, it is always associated with that index for the duration of the continuation's lifetime. Because of these semantics, aContinuation
is not directly mutable using theadd
orremove
methods. - Added the
CaseFormats
utility class to provide common operations related to theCaseFormat
enum from Guava. - Added
Sequences#isSequenceType
method to check whether a class is that of aSequence
. - Added
Reflection#loadClassQuietly
to load a class without throwing a checked exception. - Deprecated the
Check
interface in favor of thejava.util.function.Predicate
. - Deprecated the
Generator
interface in favor ofjava.util.function.Supplier
.
- Add the
Adjective
framework. AnAdjective
is a group of class and class-hirearchy specific definitions that describe a trait that may apply to objects. Some adjectives may have built-in definitions, but all of them are intended to be customizable on a per-instance (e.g. no static state) basis using thedefine
method. An adjective's applicability for an object can be tested using thedescribes
method. - The
Empty
adjective is provided. By default,Empty
describes a null value, an empty String, an empty Iterable, or an empty Array. - Deprecated the
AnyObjects#isNullOrEmpty
* andAnyObjects#registerEmptyDefinition
methods in favor of usingEmpty
instances when needed. These methods should be avoid because they rely on static state that can cause global conflicts. - Added
Sequences
utility class containing operations forIterable
andArray
objects. - Added
Enums
utility class with functions to parse enums from values while ignoringtoString
case and/or using custom logic. - Added the
Association#ensure
static factory method that only creates a newAssociation
from aMap
if theMap
is not already anAssociation
. Otherwise, the input instance is returned. - Improved the efficiency of creating a new
Association
instance from an existing instance. - Added a
TriFunction
functional interface that is a three-arity specialization of aFunction
.
- Added the
Association
data type. AnAssociation
is a nested mapping encapsulated within aMap<String, Object>
that has custom logic for handling navigable traversal paths (e.g. keys that use periods (e.g..
to indicate traversing from one level within the Map to a deeper level (e.g. a nested collection or Map))). - Deprecated the
Collectives
functions. - Deprecated the
AnyMaps#explode
andAnyMaps#navigate
functions in favor of theAssociation
data type. - Added
MergeStrategies
class that containsmerge
functions forMap
andAssociation
objects. The provided strategies areours
,theirs
,concat
andupsert
.
- Initial Relase