rendered paste bodypublic TeacherIntervalTree () { intervalTree = new BinaryTree < PairInformation < IntInformation , IntInformation > >();}public void insert ( PairInformation < IntInformation , IntInformation > interval ) { insert ( intervalTree , interval );}private void insert (BinaryTreeI < PairInformation < IntInformation , IntInformation > > tree , PairInformation < IntInformation , IntInformation > interval ) { if ( tree . size () == 0) { tree . set ( interval , new BinaryTree < PairInformation < IntInformation , IntInformation > >() , new BinaryTree < PairInformation < IntInformation , IntInformation > >()); return ; } else { int a = interval . firstValue (). intValue (); int b = interval . secondValue (). intValue (); int c = tree . root (). firstValue (). intValue (); int d = tree . root (). secondValue (). intValue (); if ( c > a && d > b ) { insert ( tree . leftSubtree () , interval ); } else if ( c < a && d < b ) { insert ( tree . rightSubtree () , interval ); } }}