public void parseRanges(String range){
		//Break up the string into the corresponding ranges. Breaking up the individual ranges/pages with ,.
		StringTokenizer s = new StringTokenizer(range,", ");
		
		//Loop over all ranges/pages.
		while(s.hasMoreTokens()){
			
			//Get the next token.
			String currentPage = s.nextToken();
			
			//The token is a range of pages.
			if(currentPage.contains("-")){
				//Parse out the starting page and ending page
				StringTokenizer rangeSplit = new StringTokenizer(currentPage, "- ");
				int start = Integer.parseInt(rangeSplit.nextToken());
				int end = Integer.parseInt(rangeSplit.nextToken());
				//Loop over and add all pages to the range.
				while(start <= end){
					if(!ranges.contains(start)){
						ranges.add(start);
					}
					start++;
				}
			}
			
			//The token is a single page.
			else {
				if(!ranges.contains(Integer.parseInt(currentPage))){
					ranges.add((Integer.parseInt(currentPage)));
				}
			}
		}
		
		//Sort the resulting array.
		Collections.sort(ranges);
	}