public static ArrayList<Thing> findThing(ThingMLModel model, String name, boolean fuzzy) { ArrayList<Thing> result = new ArrayList<Thing>(); for (Thing t : allThings(model)) { if (t.getName().startsWith(name)) { if (fuzzy) result.add(t); else if (t.getName().equals(name)) result.add(t); } } return result; }