private boolean arrayKeyValueExists(String key,String value){
  if (visitedPost.containsKey(key)) {
    for (    String s : visitedPost.get(key)) {
      if (s.equals(value)) {
        return true;
      }
    }
  }
  return false;
}

private boolean arrayKeyValueExists ( String key , String value ) { if ( visitedPost . containsKey ( key ) ) { for ( String s : visitedPost . get ( key ) ) { if ( s . equals ( value ) ) { return true ; } } } return false ; }
checks whether the value exists in an arraylist of certain key .
