/* * IDateInvestigator.java * * Created on October 10, 2002, 12:50 AM */ /** * Interface for an encapsulated date, and interesting information about that date * * @author dickey */ public interface IDateInvestigator extends Comparable { /**set the date to be investigated. *returns true if the date is valid, false otherwise. *The definition of "valid" may depend on the particular Investigator */ public boolean setDate(String dateString); /** get a string with complete information about the date. * The definition of "complete information" may depend upon the Investigator. * However, for valid dates, all of the information of "interestingness" must * be concatenated into this one string. * If the string is long, it should contain line feeds at appropriate places. * The method should never return null. * Suggestion: if the date is invalid, return a string that explains why. */ public String dateInformation(); /** Return a string identifying this date investigator's author. *The string should be short. */ public String getAuthor(); /** Return a string which names or briefly describes the date investigator class. *The string should be short. */ public String getDescription(); /** method interfaces added for Project 2 */ public String getDate( ); //return the date in its original format as supplied to the object (any padding can be removed, and any linefeeds should be removed). It is an error for this method to be called if no date has been stored. public void setHistoricalFact(String hFact); //record a historical fact about the date. Any old facts are not lost. public String getHistoricalFacts( ); //return all known historical facts about the date, as a single string. Individual facts should be separated with a '\n' character (there could be additional \n characters within the string). If there are no known facts, return a string stating so. public void setInterestingnessFact(String iFact); //record an "interesting" fact about the date. Any old facts are not lost. public String getInterestingnessFacts( ); //return all known interestingness facts about the date, as a single string. Individual facts should be separated with a '\n' character (there could be additional \n characters within the string). If there are no known facts, return a string stating so. } //end IDateInvestigator