Synchronize changes from .net 6.
- Add type
Index
indicates a forward or reverse index. - Add type
Range
indicates a range between start and endIndex
. - Add new method
chunk()
to support slicing by a fixed number of elements. - Add new overloads for
elementAt(Index)
andelementAtOrDefault(Index)
methods to support get element by forward or reverse index. - Add new overloads for
firstOrDefault()
,lastOrDefault()
andsingleOrDefault()
methods to support return custom default value when sequence is empty. - Add new overloads for
max()
,maxBy()
,min()
andminBy()
methods to support custom comparer. - Add new overloads for
take(Range)
method to support get elements between start and endIndex
. - Add new overloads for
toMap()
andtoLinkedMap()
methods to specify which key to keep when conflicting.
- Modify first param type of methods
exceptBy(...)
andintersectBy(...)
fromIEnumerable<? extends TSource>
toIEnumerable<? extends TKey>
.
- Now
skipLast()
andtakeLast()
methods support mutable sequence.
- Download https://repo1.maven.org/maven2/com/bestvike/linq/6.0.0/
- Source code https://github.com/timandy/linq/tree/v6.0.0
Synchronize changes from .net 5.
- Add
size()
andisEmpty()
methods forICollection
interface. - Add
StringSplitOptions.TrimEntries
forsplit()
method. - Add
zip()
api to cast three sequence into a Tuple3 sequence.
- Improve performance of method
ArrayListEnumerable.toArray(Class<TSource> clazz)
. - Optimize allocation of hash sets to reduce the number of
resize
times. Effected methodstoMap
,toLinkedMap
,toSet
,toLinkedSet
. - Keep first value for duplicated key. Effected methods
toMap
,toLinkedMap
. - Return empty sequence instead of throw
ArgumentNullException
when source is null. Effected methodsof
,as
,chars
,words
,lines
,split
.
- In order to reduce sorting time, methods
first(predicate)
andfirstOrDefault(predicate)
afterOrderedEnumerable
call the predicate once per element. So don't call side-effect methods in linq. See dotnet/runtime#31554. - Don't reuse the lazy result of
skipLast
andtakeLast
when the source will be modified. See dotnet/runtime#42506.
- Download https://repo1.maven.org/maven2/com/bestvike/linq/5.0.0/
- Source code https://github.com/timandy/linq/tree/v5.0.0
- Support custom debug view for any type by
DebuggerDisplay
,DebuggerTypeProxy
annotation.
- Rename
DebugView.getDebuggerDisplay(...)
toDebugView.getDebuggerDisplayText(...)
. - Rename
DebugView.getDebuggerTypeProxy(...)
toDebugView.getDebuggerProxyObject(...)
. - Modify debugger display for types which is cheap to count the elements.
- Download https://repo1.maven.org/maven2/com/bestvike/linq/3.1.0/
- Source code https://github.com/timandy/linq/tree/v3.1.0
This is the first stable version available for production. It is highly recommended to upgrade to this version if you have used a previous version.
- Fix unsigned compare bugs.
- Fix
Lookup.ApplyResultSelector
bugs. - Fix
OrderedEnumerableRangeEnumerator
not iterate maxIdx. - Fix
EnumerablePartition
error assert. - Fix inner enumerator of
CrossJoinIterator
andSelectManyIterator
dispose twice. - Fix not check selector param for
sum
with selector. - Fix bug with
select(...).count()
on an IPartition. - Fix bug with
skip
,take
on an empty IOrderedEnumerable. - Fix
union
andunionBy
not close when break iterate.
- Add
zip
Tuple api. - Add support compatible stream for
IEnumerable
. - Add api
toLinkedList
,toLinkedMap
,toLinkedSet
,toCollection
forIEnumerable
. - Add api
indexOf
,lastIndexOf
forIEnumerable
. - Add api
findIndex
,findLastIndex
forIEnumerable
. - Add api
format
,joining
forIEnumerable
to print values. - Add api
ofNullable
,chars
,words
,lines
,split
,infinite
,loop
,enumerate
,iterate
forLinq
. - Add
_indexOf
and_lastIndexOf
method forIList
. - Add
_findIndex()
and_findLastIndex()
method forIList
. - Add
IArrayList
interface which extendsRandomAccess
for random access list andIList
for other. - Add
IArray
interface to determineIArrayList
contains an array or not. - Add
CultureInfo.setCurrent
to set current locale for string actions in linq. - Add
StringComparer
for string equals, hashCode and compare actions. - Add
ValueType
as super class for value type. - Add support more type cast to IEnumerable like
IEnumerable
,Iterator
andEnumeration
. - Add
Linq.as()
to generateIEnumerable
fromObject
. - Add debug view support.
- Add primitive functional interface.
- Add covariant & contravariant support.
- Remove override runOnce() for
IList
. - Not copy data when cast primitive array to IEnumerable.
- Not create array when cast singleton to IEnumerable.
- Optimize performance of
takeLast
. - Optimize
range().select()
andrepeat().select()
. - Optimize
min
,max
,minBy
,maxBy
performance. - Optimize
TakeLastIterator
dispose action. - Optimize
toMap
andtoSet
methods. - Optimize
indexOf
andlastIndexOf
in EqualityComparer. - Optimize
skipLast
performance. - Optimize performance by use enumerator instead of iterator.
- Implements
IIListProvider
forDistinctByIterator
,CrossJoinIterator
,UnionByIterator
.
- Translated all LINQ to Objects API of .net core 3.0.
- Use ThrowHelper to throw Exceptions.
- Rename package
bridge
toadapter
. - Rename
Linq.asEnumerable()
toLinq.of()
. - Rename
TupleMore
toTupleN
. - Rename
Linq.of(CharSequence)
toLinq.chars(CharSequence)
. - Update junit version to 5.x.
- Update plugin version to latest.
- Change the year of copyright.
Parameters covariant
- IEnumerable (T is covariant)
- IEnumerator (T is covariant)
- IGrouping<TKey, TElement> (TKey and TElement are covariant)
Parameters contravariant
- Comparator (T is contravariant)
- Comparable (T is contravariant)
- IEqualityComparer (T is contravariant)
- IComparison (T is contravariant)
- Action<T1, T2, ... TN> (T1...TN are contravariant)
- Func<T1, T2, ... TResult> (T1...TN are contravariant, TResult is covariant)
- Predicate<T1, T2, ... TN> (T1...TN are contravariant)
- Download https://repo1.maven.org/maven2/com/bestvike/linq/3.0.0/
- Source code https://github.com/timandy/linq/tree/v3.0.0
- Fix
first
firstOrDefault
bugs.
- Refactor from .net core 2.
- Performance improvement.
- Download https://repo1.maven.org/maven2/com/bestvike/linq/2.0.1/
- Source code https://github.com/timandy/linq/tree/v2.0.1
- Fix
Comparer.compare()
bugs.
- Translated all LINQ to Objects API of .net core 2.0.
- Add class
out
,ref
. - A lot of refactoring optimization has been done.
- Performance improvement.
- Update plugin to latest version.
- Download https://repo1.maven.org/maven2/com/bestvike/linq/2.0.0/
- Source code https://github.com/timandy/linq/tree/v2.0.0
- Fix Buffer count is zero throws NullPointerException.
- Add API
distinctBy
,unionBy
,intersectBy
,exceptBy
,minBy
,maxBy
. - Support CI.
- Update logo.
- Download https://repo1.maven.org/maven2/com/bestvike/linq/1.0.1/
- Source code https://github.com/timandy/linq/tree/v1.0.1
- Translated all LINQ to Objects API of .net framework 4.7.
- Add unit test cases.
- Add API
leftJoin
,rightJoin
,fullJoin
,crossJoin
. - Support cast
CharSequence
toIEnumerable
. - Add Tuple definitions.