public SPIStatistic getStatistic ( int id ) { for ( int i = 0 ; i < _stats . length ; i ++ ) { if ( _stats [ i ] != null && _stats [ i ] . getId ( ) == id ) { return _stats [ i ] ; /* * ~~~~~~~~~~~~~~ commented ~~~~~~~~~~~~~~ * // do not check as it is done in individual statistic type * if (_stats[i].isEnabled()) * return _stats[i]; * else * return null; * ~~~~~~~~~~~~~~ commented ~~~~~~~~~~~~~~ */ } } return null ; }
looping overhead in this method