Пример #1
0
  public ModelCloudProxySet hasHostName(String lower, String upper) {
    ModelCloudProxySet result = new ModelCloudProxySet();

    for (ModelCloudProxy obj : this) {
      if (lower.compareTo(obj.getHostName()) <= 0 && obj.getHostName().compareTo(upper) <= 0) {
        result.add(obj);
      }
    }

    return result;
  }
Пример #2
0
  public ModelCloudProxySet hasHostName(String value) {
    ModelCloudProxySet result = new ModelCloudProxySet();

    for (ModelCloudProxy obj : this) {
      if (value.equals(obj.getHostName())) {
        result.add(obj);
      }
    }

    return result;
  }
Пример #3
0
  public ModelCloudProxySet hasPortNo(int lower, int upper) {
    ModelCloudProxySet result = new ModelCloudProxySet();

    for (ModelCloudProxy obj : this) {
      if (lower <= obj.getPortNo() && obj.getPortNo() <= upper) {
        result.add(obj);
      }
    }

    return result;
  }
Пример #4
0
  public ModelCloudProxySet hasPortNo(int value) {
    ModelCloudProxySet result = new ModelCloudProxySet();

    for (ModelCloudProxy obj : this) {
      if (value == obj.getPortNo()) {
        result.add(obj);
      }
    }

    return result;
  }
Пример #5
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;
  }
Пример #6
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;
  }