public ClassModelSet hasName(String value) { ClassModelSet result = new ClassModelSet(); for (ClassModel obj : this) { if (value.equals(obj.getName())) { result.add(obj); } } return result; }
public ClassModelSet hasName(String lower, String upper) { ClassModelSet result = new ClassModelSet(); for (ClassModel obj : this) { if (lower.compareTo(obj.getName()) <= 0 && obj.getName().compareTo(upper) <= 0) { result.add(obj); } } return result; }
public ClassModelSet hasEnumerations(Object value) { ObjectSet neighbors = new ObjectSet(); if (value instanceof Collection) { neighbors.addAll((Collection<?>) value); } else { neighbors.add(value); } ClassModelSet answer = new ClassModelSet(); for (ClassModel obj : this) { if (!Collections.disjoint(neighbors, obj.getEnumerations())) { answer.add(obj); } } return answer; }