code: public static <T extends Comparable<? super T>> Set<Interval<T>> query(TreeNode<T> root, T point, Set<Interval<T>> res) {
  		if (root == null)
  			return res;
  		if (point.compareTo(root.midpoint) <= 0){
  			for (Interval<T> next: root.increasing){
  				if (next.isRightOf(point))
  					break;
  				res.add(next);
  			}
  			return TreeNode.query(root.left, point, res);
  		} else{
  			for (Interval<T> next: root.decreasing){
  				if (next.isLeftOf(point))
  					break;
  				res.add(next);
  			}
  			return TreeNode.query(root.right, point, res);
  		}
  	}
docs: A helper function for the {@link IntervalTree#query(Comparable)} method.
  It searches recursively for all intervals stored in the subtree rooted at
  the current node, that intersect a target point.
  
  @param root The root of the currently traversed subtree. May be {@code null}.
  @param point The query point.
  @param res The set used to store all intervals to be returned.
  @param <T> The type of the start and end points of the intervals, as well as
  the query point.
  @return The set of all intervals from the current subtree, containing the query.