コード例 #1
0
  @Override
  public FGEArea union(FGEArea area) {
    if (containsArea(area)) {
      return clone();
    }
    if (area.containsArea(this)) {
      return area.clone();
    }

    return new FGEUnionArea(this, area);
  }
コード例 #2
0
  @Override
  public FGEArea intersect(FGEArea area) {
    if (area.containsArea(this)) {
      return this.clone();
    }
    if (containsArea(area)) {
      return area.clone();
    }

    FGEIntersectionArea returned = new FGEIntersectionArea(this, area);
    if (returned.isDevelopable()) {
      return returned.makeDevelopped();
    } else {
      return returned;
    }
  }