Exemple #1
0
  public ClassModelSet hasName(String value) {
    ClassModelSet result = new ClassModelSet();

    for (ClassModel obj : this) {
      if (value.equals(obj.getName())) {
        result.add(obj);
      }
    }

    return result;
  }
Exemple #2
0
  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;
  }
Exemple #3
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;
  }