MCPcopy Create free account
hub / github.com/jOOQ/jOOQ / map

Method map

jOOQ/src/main/java/org/jooq/impl/Tools.java:2578–2587  ·  view source on GitHub ↗

Like Stream.of(array).map(mapper).toArray(constructor) but without the entire stream pipeline.

(T[] array, ThrowingFunction<? super T, ? extends U, E> mapper, IntFunction<U[]> constructor)

Source from the content-addressed store, hash-verified

2576 * without the entire stream pipeline.
2577 */
2578 static final <T, U, E extends Exception> U[] map(T[] array, ThrowingFunction<? super T, ? extends U, E> mapper, IntFunction<U[]> constructor) throws E {
2579 if (array == null)
2580 return constructor.apply(0);
2581
2582 U[] result = constructor.apply(array.length);
2583 for (int i = 0; i < array.length; i++)
2584 result[i] = mapper.apply(array[i]);
2585
2586 return result;
2587 }
2588
2589 /**
2590 * Like <code>Stream.of(array).map(mapper).toArray(constructor)</code> but

Callers 15

FieldsImplMethod · 0.95
typesMethod · 0.95
sourcesMethod · 0.95
metaMethod · 0.95
extractBindValuesMethod · 0.95
fetchFromStringDataMethod · 0.95
batchMethod · 0.95
dropTypeMethod · 0.95
dropTypeIfExistsMethod · 0.95
truncateMethod · 0.95
initFieldAliasesMethod · 0.95
unionParenthesisMethod · 0.95

Calls 5

newListWithCapacityMethod · 0.95
emptyListMethod · 0.80
applyMethod · 0.65
sizeMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected