MCPcopy Create free account
hub / github.com/LFYSec/MScan / map

Method map

src/main/java/pascal/taie/util/collection/Lists.java:45–48  ·  view source on GitHub ↗

Applies a mapper function on a given collection and returns the results as a list. The resulting list is unmodifiable.

(Collection<? extends T> c,
                                     Function<T, R> mapper)

Source from the content-addressed store, hash-verified

43 * the results as a list. The resulting list is unmodifiable.
44 */
45 public static <T, R> List<R> map(Collection<? extends T> c,
46 Function<T, R> mapper) {
47 return c.isEmpty() ? List.of() : c.stream().map(mapper).toList();
48 }
49
50 /**
51 * Tests the elements in a given collection and returns a list of elements

Callers 15

processConfigsMethod · 0.95
getInterfacesMethod · 0.95
getDeclaredFieldsMethod · 0.95
getDeclaredMethodsMethod · 0.95
convertMethodMethod · 0.95
convertMethodRefMethod · 0.95
convertAnnotationsMethod · 0.95
linkJumpTargetsMethod · 0.95
caseMethodTypeMethod · 0.95
caseNewMultiArrayExprMethod · 0.95

Calls 4

streamMethod · 0.80
isEmptyMethod · 0.65
ofMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected