MCPcopy Create free account
hub / github.com/careercup/ctci / getTagCode

Method getTagCode

java/Chapter 17/Question17_10/Attribute.java:11–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 }
10
11 public String getTagCode() {
12 if (tag == "family") {
13 return "1";
14 } else if (tag == "person") {
15 return "2";
16 } else if (tag == "firstName") {
17 return "3";
18 } else if (tag == "lastName") {
19 return "4";
20 } else if (tag == "state") {
21 return "5";
22 }
23 return "--";
24 }
25}

Callers 1

encodeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected