コード例 #1
0
ファイル: ClassModelSet.java プロジェクト: blacklp/SDMLib
  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;
  }
コード例 #2
0
  public ModelCloudProxySet hasRoot(Object value) {
    ObjectSet neighbors = new ObjectSet();

    if (value instanceof Collection) {
      neighbors.addAll((Collection<?>) value);
    } else {
      neighbors.add(value);
    }

    ModelCloudProxySet answer = new ModelCloudProxySet();

    for (ModelCloudProxy obj : this) {
      if (neighbors.contains(obj.getRoot())) {
        answer.add(obj);
      }
    }

    return answer;
  }
コード例 #3
0
  public ModelCloudProxySet hasProvidedSpaces(Object value) {
    ObjectSet neighbors = new ObjectSet();

    if (value instanceof Collection) {
      neighbors.addAll((Collection<?>) value);
    } else {
      neighbors.add(value);
    }

    ModelCloudProxySet answer = new ModelCloudProxySet();

    for (ModelCloudProxy obj : this) {
      if (!Collections.disjoint(neighbors, obj.getProvidedSpaces())) {
        answer.add(obj);
      }
    }

    return answer;
  }
コード例 #4
0
ファイル: GraphSet.java プロジェクト: blacklp/SDMLib
  public GraphSet hasGcs(Object value) {
    ObjectSet neighbors = new ObjectSet();

    if (value instanceof Collection) {
      neighbors.addAll((Collection<?>) value);
    } else {
      neighbors.add(value);
    }

    GraphSet answer = new GraphSet();

    for (Graph obj : this) {
      if (!Collections.disjoint(neighbors, obj.getGcs())) {
        answer.add(obj);
      }
    }

    return answer;
  }