ar.com.ktulu.dict
Interface Matches

All Known Implementing Classes:
AbstractMatches, MatchesContainer

public interface Matches

An iterator over a collection of dictionary words. This is what the databases return in response to a define(String) or match(String, Strategy). It works like an Iterator.

Author:
Luis Parravicini
See Also:
Database, Database.define(String), Database.match(String, Strategy)

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.
 boolean hasNext()
          Returns true there are more elements.
 int matches()
          Returns the number of matches.
 Definition next()
          Returns the definition of the next word in the collection.
 java.lang.String nextWord()
          Returns the next word definition in the collection.
 

Method Detail

getDatabase

public Database getDatabase()
Returns the database that was used to perform the search.


getWord

public java.lang.String getWord()
Returns the word that was used to perform the search.


matches

public int matches()
Returns the number of matches.


nextWord

public java.lang.String nextWord()
                          throws DatabaseException
Returns the next word definition in the collection.

DatabaseException

hasNext

public boolean hasNext()
                throws DatabaseException
Returns true there are more elements.

DatabaseException

next

public Definition next()
                throws DatabaseException
Returns the definition of the next word in the collection.

DatabaseException