// Arup Guha
// 4/6/2010
// 2008 AP Free Response Question #4A Solution

public class SubstringChecker implements Checker {
	
	private String thisString;
	
	public SubstringChecker(String s) {
		thisString = s;
	}

	// indexOf in the String class finds WHERE a substring occurs. If it doesn't it
	// returns -1, so this is the most simple method to use for this task.	
	public boolean accept(String text) {
		return text.indexOf(thisString) != -1;
	}
}