/**
 * TitleSearchResult.java
 * Created May 14, 2008
 * Copyright (c) TANDBERG Television 2007-2008
 */
package com.tandbergtv.watchpoint.pmm.title.search;

import java.util.Collection;

import com.tandbergtv.watchpoint.pmm.entities.Title;

/**
 * A simple holder for search results
 * 
 * @author Sahil Verma
 */
public class TitleSearchResult {
	
	private Collection<Title> titles;
	
	private int count;

	/**
	 * Creates a TitleSearchResult
	 * @param titles
	 * @param count
	 */
	public TitleSearchResult(Collection<Title> titles, int count) {
		this.titles = titles;
		this.count = count;
	}

	/**
	 * Returns a subset of titles (which may equal all matches) that were the result of a search
	 * 
	 * @return the titles
	 */
	public Collection<Title> getTitles() {
		return this.titles;
	}

	/**
	 * Returns the total number of titles that matched the criteria
	 * 
	 * @return the count
	 */
	public int getCount() {
		return this.count;
	}
}
