private boolean matchesName(String... words){
  for (  String word : words) {
    if (!nameWords.contains(word)) {
      return false;
    }
  }
  return true;
}

private boolean matchesName ( String ... words ) { for ( String word : words ) { if ( ! nameWords . contains ( word ) ) { return false ; } } return true ; }
check if all of the given words are present in namewords .
