sears.search.data
Class SubtitleFile

java.lang.Object
  extended by sears.search.data.SubtitleFile

public class SubtitleFile
extends java.lang.Object

Search operations


Constructor Summary
SubtitleFile(java.util.ArrayList<Subtitle> aListOfSubtitles)
           
 
Method Summary
 ListOfRow getAllRowWhichContainsAtLeastOneOccurrenceOfText(java.lang.String text)
          Constructs and return a list of all row that contains at least one occurrence of text
 int getCountOfOccurrencesOfText(java.lang.String text)
          Gets the count of all the text occurrences given in parameters
 void setListOfSubtitles(java.util.ArrayList<Subtitle> aListOfSubtitles)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubtitleFile

public SubtitleFile(java.util.ArrayList<Subtitle> aListOfSubtitles)
Parameters:
aListOfSubtitles -
Method Detail

setListOfSubtitles

public void setListOfSubtitles(java.util.ArrayList<Subtitle> aListOfSubtitles)
Parameters:
aListOfSubtitles -

getCountOfOccurrencesOfText

public int getCountOfOccurrencesOfText(java.lang.String text)
Gets the count of all the text occurrences given in parameters

Parameters:
text - a non null and empty string
Returns:
the occurrences count
Throws:
java.lang.NullPointerException - if text is null
java.lang.IllegalArgumentException - if text is an empty string

getAllRowWhichContainsAtLeastOneOccurrenceOfText

public ListOfRow getAllRowWhichContainsAtLeastOneOccurrenceOfText(java.lang.String text)
Constructs and return a list of all row that contains at least one occurrence of text

Parameters:
text - a non null and a non empty string string
Returns:
the list of all the row that contains at least one occurrence of text