MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / test

Method test

collectiontopics/TypesForSets.java:47–53  ·  view source on GitHub ↗
(Set<T> set, Function<Integer, T> type)

Source from the content-addressed store, hash-verified

45 set.add(type.apply(i));
46 }
47 static <T> void
48 test(Set<T> set, Function<Integer, T> type) {
49 fill(set, type);
50 fill(set, type); // Try to add duplicates
51 fill(set, type);
52 System.out.println(set);
53 }
54 public static void main(String[] args) {
55 test(new HashSet<>(), HashType::new);
56 test(new LinkedHashSet<>(), HashType::new);

Callers 1

mainMethod · 0.95

Calls 1

fillMethod · 0.95

Tested by

no test coverage detected