Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed
/*==============================================================================Project: Simple JAVA Search Engine for Keyword SearchJAVA Source file for the class IndexTableCOPYRIGHT (C), 1998, Thomas BaierALL RIGHTS RESERVED.$Source: /scratch/CVS-ARCHIVE/R/doc/html/search/IndexTable.java,v $$Revision: 1.1 $$Date: 1998/05/15 10:38:10 $$Author: leisch $==============================================================================*//* -------------------------------- Imports --------------------------------- */import java.util.Vector;import java.util.Enumeration;/*==============================================================================Interface of class IndexTable==============================================================================*//*------------------------------------------------------------------------------CLASS: IndexTableSUPER: VectorCONF. TO:PURPOSE:NOTES:HISTORY: 98-04-26: created------------------------------------------------------------------------------*/public class IndexTable extends Vector{/*============================================================================Public methods============================================================================*//*----------------------------------------------------------------------------INTERFACE:PURPOSE: build a vector of found entriesNOTES: convenience function to extend Vector super classPARAMS: String key: the search stringTHROWS:RETURNS: Vector: a vector of found entries or null if no matches foundHISTORY: 98-04-26: created----------------------------------------------------------------------------*/public Vector search (String key){Vector returnValue = new Vector ();Enumeration cursor = elements ();while (cursor.hasMoreElements ()) {IndexEntry entry = (IndexEntry) cursor.nextElement ();if (entry.matches (key)) {returnValue.addElement (entry);}}if (!returnValue.isEmpty ()) {return returnValue;}return null;}/*============================================================================Protected methods============================================================================*//*============================================================================Private methods============================================================================*//*============================================================================Instance Variables============================================================================*//*============================================================================Static Data============================================================================*/}/*==============================================================================HISTORY:$Log: IndexTable.java,v $Revision 1.1 1998/05/15 10:38:10 leischNew: Search EngineRevision 1.1 1998/04/26 21:46:51 baierInitial revision==============================================================================*/// Local Variables:// mode: Java// mode: font-lock// End: