TransformedVectorExtension<T> extension
Methods
-
map<S>(S callback(int index, T value), [DataType<S>? dataType])
→ Vector<S>
-
Returns a read-only view on this Vector with all its elements lazily
converted by calling the provided transformation
callback
.
-
transform<S>(S read(int index, T value), {T write(int index, S value)?, DataType<S>? dataType})
→ Vector<S>
-
Returns a view on this Vector with all its elements lazily converted
by calling the provided
read
transformation. An optionally provided
write
transformation enables writing to the returned vector.