@Test public void testCompareList() throws Exception { ParseObject object = new ParseObject("SomeObject"); List<Integer> list = new ArrayList<>(); list.add(1); list.add(2); list.add(3); object.put("list", list); ParseQuery.State<ParseObject> query; OfflineQueryLogic logic = new OfflineQueryLogic(null); query = new ParseQuery.State.Builder<>("SomeObject") .whereEqualTo("list", 2) .build(); assertTrue(matches(logic, query, object)); query = new ParseQuery.State.Builder<>("SomeObject") .whereEqualTo("list", 4) .build(); assertFalse(matches(logic, query, object)); }
private static boolean compareList(Object constraint, List<?> values, Decider decider) { for (Object value : values) { if (decider.decide(constraint, value)) { return true; } } return false; }
OfflineQueryLogic { private static boolean compareList(Object constraint, List<?> values, Decider decider) { for (Object value : values) { if (decider.decide(constraint, value)) { return true; } } return false; } }
OfflineQueryLogic { private static boolean compareList(Object constraint, List<?> values, Decider decider) { for (Object value : values) { if (decider.decide(constraint, value)) { return true; } } return false; } OfflineQueryLogic(OfflineStore store); }
OfflineQueryLogic { private static boolean compareList(Object constraint, List<?> values, Decider decider) { for (Object value : values) { if (decider.decide(constraint, value)) { return true; } } return false; } OfflineQueryLogic(OfflineStore store);  }
OfflineQueryLogic { private static boolean compareList(Object constraint, List<?> values, Decider decider) { for (Object value : values) { if (decider.decide(constraint, value)) { return true; } } return false; } OfflineQueryLogic(OfflineStore store);   }