public SmsMmsMessage shouldNotify(){
  SmsMmsMessage message;
  for (int i=0; i < messages.size(); i++) {
    message=messages.get(i);
    if (message.shouldNotify()) {
      return message;
    }
  }
  return null;
}

public SmsMmsMessage shouldNotify ( ) { SmsMmsMessage message ; for ( int i = 0 ; i < messages . size ( ) ; i ++ ) { message = messages . get ( i ) ; if ( message . shouldNotify ( ) ) { return message ; } } return null ; }
check if the set of messages associated with this pager should send a notification .
