Esempio n. 1
0
  public EnumerationSet getEnumerations() {
    EnumerationSet result = new EnumerationSet();

    for (ClassModel obj : this) {
      result.addAll(obj.getEnumerations());
    }

    return result;
  }
Esempio n. 2
0
  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;
  }