protected void update(IInterval interval){
  if (intervals == null) {
    intervals=new ArrayList<IInterval>();
  }
  intervals.add(interval);
}

protected void update ( IInterval interval ) { if ( intervals == null ) { intervals = new ArrayList < IInterval > ( ) ; } intervals . add ( interval ) ; }
algorithms over segmenttrees often store additional information with each node , and may perform complex computations on insert . this method is overridden by subclasses as required . < p > just append to the end .
