ar.com.ktulu.dict
Class AbstractMatches

java.lang.Object
  |
  +--ar.com.ktulu.dict.AbstractMatches
All Implemented Interfaces:
Matches
Direct Known Subclasses:
DefineMatches, JDBCMatches, StrategyMatches

public abstract class AbstractMatches
extends java.lang.Object
implements Matches

Common knowledge for the different kinds of matches used.

Author:
Luis Parravicini

Field Summary
(package private)  Database db
           
(package private)  int size
           
(package private)  java.text.CollationKey word
           
 
Constructor Summary
AbstractMatches(Database db, java.text.CollationKey word)
           
 
Method Summary
 Database getDatabase()
          Returns the database that was used to perform the search.
 java.lang.String getWord()
          Returns the word that was used to perform the search.
abstract  boolean hasNext()
          Returns true there are more elements.
 int matches()
          Returns the number of matches.
abstract  Definition next()
          Returns the definition of the next word in the collection.
abstract  java.lang.String nextWord()
          Returns the next word definition in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

word

java.text.CollationKey word

db

Database db

size

int size
Constructor Detail

AbstractMatches

public AbstractMatches(Database db,
                       java.text.CollationKey word)
Method Detail

getDatabase

public Database getDatabase()
Description copied from interface: Matches
Returns the database that was used to perform the search.

Specified by:
getDatabase in interface Matches

getWord

public java.lang.String getWord()
Description copied from interface: Matches
Returns the word that was used to perform the search.

Specified by:
getWord in interface Matches

matches

public int matches()
Description copied from interface: Matches
Returns the number of matches.

Specified by:
matches in interface Matches

hasNext

public abstract boolean hasNext()
                         throws DatabaseException
Description copied from interface: Matches
Returns true there are more elements.

Specified by:
hasNext in interface Matches
DatabaseException

next

public abstract Definition next()
                         throws DatabaseException
Description copied from interface: Matches
Returns the definition of the next word in the collection.

Specified by:
next in interface Matches
DatabaseException

nextWord

public abstract java.lang.String nextWord()
                                   throws DatabaseException
Description copied from interface: Matches
Returns the next word definition in the collection.

Specified by:
nextWord in interface Matches
DatabaseException