/* * INameFinder.java * * Created on January 12, 2003, 12:58 PM */ package project1; /** Interface for an oracle that searches "entrails" for signs of an omen. * * @author dickey */ public interface IOracle { /** Tell the name of this oracle. * @return A short string with the name of the oracle; there should be * no leading or trailing whitespace. */ String getName(); /** See if some data is suitable to be presented to the oracle. * For example, the God of Luck required initials (2 upper case characters) * as request data. * @param requestData the data, as a string; exact format and requirements * are oracle-dependent. * @return true iff the requestData is acceptable (can be processed without * error) by the oracle. */ public boolean checkRequestData(String requestData); /** Search the entrails and return the omen found. * It should never go into an infinite loop. * @param requestData The information (typically a name) about which the oracle * is searching for information (for an omen). * @return an omen, or null if there is no omen at all. */ public IOmen searchEntrailsForOmen(String requestData); //end IOracle }