public List<Page> relevantPages(String query){
  List<Page> relevantPages=new ArrayList<Page>();
  for (  Page p : pTable.values()) {
    if (matches(query,p.getContent())) {
      relevantPages.add(p);
    }
  }
  return relevantPages;
}

public List < Page > relevantPages ( String query ) { List < Page > relevantPages = new ArrayList < Page > ( ) ; for ( Page p : pTable . values ( ) ) { if ( matches ( query , p . getContent ( ) ) ) { relevantPages . add ( p ) ; } } return relevantPages ; }
fetches and returns all pages that match the query
