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

Method hasField

exceptions/DynamicFields.java:27–32  ·  view source on GitHub ↗
(String id)

Source from the content-addressed store, hash-verified

25 return result.toString();
26 }
27 private int hasField(String id) {
28 for(int i = 0; i < fields.length; i++)
29 if(id.equals(fields[i][0]))
30 return i;
31 return -1;
32 }
33 private int getFieldNumber(String id)
34 throws NoSuchFieldException {
35 int fieldNum = hasField(id);

Callers 2

getFieldNumberMethod · 0.95
setFieldMethod · 0.95

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected