MCPcopy Create free account
hub / github.com/M66B/FairEmail / contains

Method contains

app/src/main/java/eu/faircode/email/EntityRule.java:1822–1837  ·  view source on GitHub ↗
(JSONObject jobject, String query)

Source from the content-addressed store, hash-verified

1820 }
1821
1822 private boolean contains(JSONObject jobject, String query) throws JSONException {
1823 Iterator<String> keys = jobject.keys();
1824 while (keys.hasNext()) {
1825 String key = keys.next();
1826 Object value = jobject.get(key);
1827 if (value instanceof JSONObject) {
1828 if (contains((JSONObject) value, query))
1829 return true;
1830 } else {
1831 if (value.toString().toLowerCase().contains(query))
1832 return true;
1833 }
1834 }
1835
1836 return false;
1837 }
1838
1839 public JSONObject toJSON() throws JSONException {
1840 JSONObject json = new JSONObject();

Callers 5

matchesMethod · 0.95
runMethod · 0.45
matchKeywordsMethod · 0.45
onActionMoveMethod · 0.45
blockSenderMethod · 0.45

Calls 3

nextMethod · 0.45
getMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected