ar.com.ktulu.dict
Class MatchesContainer

java.lang.Object
  |
  +--ar.com.ktulu.dict.MatchesContainer
All Implemented Interfaces:
Matches

public class MatchesContainer
extends java.lang.Object
implements Matches

Given a list of Matches, it iterates over all of them.

Author:
Luis Parravicini
See Also:
Matches

Field Summary
(package private)  int idx
           
(package private)  java.util.ArrayList matches
           
(package private)  int size
           
 
Constructor Summary
MatchesContainer(java.util.ArrayList matches)
           
 
Method Summary
protected  int countMatches()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matches

java.util.ArrayList matches

size

int size

idx

int idx
Constructor Detail

MatchesContainer

public MatchesContainer(java.util.ArrayList matches)
                 throws DatabaseException
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 boolean hasNext()
                throws DatabaseException
Description copied from interface: Matches
Returns true there are more elements.

Specified by:
hasNext in interface Matches
DatabaseException

next

public 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 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

countMatches

protected int countMatches()
                    throws DatabaseException
DatabaseException