コード例 #1
0
  public IDomainAdaptor merge(IDomainAdaptor adaptor) {
    IntRangeDomainAdaptor a = (IntRangeDomainAdaptor) adaptor;

    int min1 = irange.getMin();
    int max1 = irange.getMax();
    int min2 = a.irange.getMin();
    int max2 = a.irange.getMax();

    int min = min1 < min2 ? min1 : min2;
    int max = max1 > max2 ? max1 : max2;

    return new IntRangeDomainAdaptor(new IntRangeDomain(min, max));
  }
コード例 #2
0
 public int getMax() {
   return irange.getMax();
 }