@ Override public Interval < C > intersect ( final Interval < C > that ) { if ( this == MAGIC || that == NULL ) { return that ; } if ( this == NULL ) { return NULL ; } if ( that == MAGIC ) { return new Interval ( this . dimension , this . range ) ; } if ( this . dimension == that . dimension ) { if ( this . isConnected ( that ) ) { return new Interval ( this . dimension , this . range . intersection ( that . range ) ) ; } return new Interval ( this . dimension ) ; } return NULL ; }
Find the intersection of two intervals .