Stream Collections for Go. Inspired in Java 8 Streams and .NET Linq
ICollection[T comparable]
is now more generic and have no predifined functions related to indexes.IList[T comparable]
which implements ICollection[T comparable]
with the addition to functions related to indexes in a list, such as Index
, At
and RemoveAt
ISet[T comparable]
which implements ICollection[T comparable]
and defines collections with only unique values.ISet[T]
.Map[K,V comparable]
which implements ICollection[KeyValuePair[K,V]]
and has additional functions related to maps.Map[K,V comparable]
which also uses a mutex to be thread safe.Map
out of IStream[T]
since Golang Generics does not support additional generic parameters to interface functions.Map
function is now a static function in the 'streams' package and has been redesigned to Map[From,To comparable](source any, ConvertFunc[From,To]) IList[To]
where the source can be []From
or IIterator[From]
MapNonComparable[From, To any](source any, ConvertFunc[From, To]) []To
for simple cases where the use of streams is not required for a mapping and allowing non-comparable types to be usedMapToPtr[T any]() []*T
to easily convert arrays of non-comparable structures to arrays of pointers to that structure (T
to *T
) which allows the resulting array to be used in streams