public static boolean isMatch(String actualString,LinkedList patterns,char wildCard){
  boolean matched=false;
  for (ListIterator iter=patterns.listIterator(0); iter.hasNext(); ) {
    if (isMatch(actualString,(String)iter.next(),wildCard)) {
      matched=true;
      break;
    }
  }
  return matched;
}

public static boolean isMatch ( String actualString , LinkedList patterns , char wildCard ) { boolean matched = false ; for ( ListIterator iter = patterns . listIterator ( 0 ) ; iter . hasNext ( ) ; ) { if ( isMatch ( actualString , ( String ) iter . next ( ) , wildCard ) ) { matched = true ; break ; } } return matched ; }
check whether the string matches the pattern .
