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

Method People

serialization/People.java:12–19  ·  view source on GitHub ↗
(String fileName)

Source from the content-addressed store, hash-verified

10
11public class People extends ArrayList<APerson> {
12 public People(String fileName) throws Exception {
13 Document doc =
14 new Builder().build(new File(fileName));
15 Elements elements =
16 doc.getRootElement().getChildElements();
17 for(int i = 0; i < elements.size(); i++)
18 add(new APerson(elements.get(i)));
19 }
20 public static void
21 main(String[] args) throws Exception {
22 People p = new People("People.xml");

Callers

nothing calls this directly

Calls 4

buildMethod · 0.80
getMethod · 0.65
sizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected