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

Method count

reflection/PetCounter.java:48–53  ·  view source on GitHub ↗
(Creator creator)

Source from the content-addressed store, hash-verified

46 counter.count("Hamster");
47 }
48 public void count(Creator creator) {
49 creator.stream().limit(20)
50 .forEach(pet -> countPet(pet));
51 System.out.println();
52 System.out.println(counter);
53 }
54 public static void main(String[] args) {
55 new PetCounter().count(new ForNamePetCreator());
56 }

Callers 3

countPetMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45

Calls 2

countPetMethod · 0.95
streamMethod · 0.45

Tested by

no test coverage detected