コード例 #1
0
ファイル: IntervalOfTime.java プロジェクト: montge/eHMP
 public IntervalOfTime(
     PointInTime low,
     PointInTime high,
     boolean lowClosed,
     boolean highClosed,
     boolean equalEndpointsAllowed) {
   if (high.equals(low) && !equalEndpointsAllowed) {
     throw new IllegalArgumentException(
         "The end point should be unequal to the low point in time when equalEndpointsAllowed is false");
   }
   this.lowClosed = lowClosed;
   this.highClosed = highClosed;
   if (low.after(high)) {
     setLow(high);
     setHigh(low);
   } else {
     setLow(low);
     setHigh(high);
   }
 }