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

Method FilledList

generics/FilledList.java:10–12  ·  view source on GitHub ↗
(Supplier<T> gen, int size)

Source from the content-addressed store, hash-verified

8
9public class FilledList<T> extends ArrayList<T> {
10 FilledList(Supplier<T> gen, int size) {
11 Suppliers.fill(this, gen, size);
12 }
13 public FilledList(T t, int size) {
14 for(int i = 0; i < size; i++)
15 this.add(t);

Callers

nothing calls this directly

Calls 2

fillMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected