import java.util.*; // Note -- this is a specification for the "gene records" mentioned in part A. // If you already have your own class, you can probably adapt it very quickly // to implement this interface. /** * A SearchResult object holds the result of looking for close matches in a * single sequence. Provides accessors for the name and sequence in which * these matches were found, and the locations of the matches. */ public interface SearchResult { /** * Returns the name of the gene in which these matches were found, or, if * this result represents a protein, the name of the gene from which the * protein was translated. * * @return name of the gene or protein. */ public String getName(); /** * Returns the gene sequence (for gene searches) or the protein sequence * (if this was a protein search) in which these matches were found. * * @return the gene or protein sequence in which the matches were found */ public String getSequence(); /** * Returns the locations of the matches. The location is the index in * the sequence of the beginning of the substring that was a sufficiently * close match. Locations are returned as a List of Integers. * * @return a List of Integers containing locations of the matches in this * sequence */ public List getMatchLocations(); // You can override toString to provide a nicely formatted display of the // SearchResult's contents. }