congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SearchResults.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
livelessons.utils.SearchResults
constructor

Best Java code snippets using livelessons.utils.SearchResults.<init> (Showing top 4 results out of 315)

origin: douglascraigschmidt/LiveLessons

return new SearchResults(Thread.currentThread().getId(),
             0,
             phrase,
origin: douglascraigschmidt/LiveLessons

/**
 * Looks for all instances of @code phrase in @code inputData and
 * return a list of all the @code SearchResults (if any).
 */
public SearchResults searchForPhrase(String phrase,
                   CharSequence input,
                   String title,
                   boolean parallel) {
  List<SearchResults.Result> resultList =
    // Use a PhraseMatchSpliterator to add the indices of all
    // places in the inputData where phrase matches.
    StreamSupport
      // Create a stream of Results to record the indices
      // (if any) where the phrase matched the input data.
      .stream(new PhraseMatchSpliterator(input, phrase),
          parallel)
        
      // This terminal operation triggers aggregate
      // operation processing and returns a list of Results.
      .collect(toList());
  // Create/return SearchResults to keep track of relevant info.
  return new SearchResults(Thread.currentThread().getId(),
               currentCycle(),
               phrase,
               title,
               resultList);
}

origin: douglascraigschmidt/LiveLessons

-> new SearchResults
(Thread.currentThread().getId(),
1,
origin: douglascraigschmidt/LiveLessons

/**
 * Search for a phrase in the input data.
 */
private static SearchResults searchForPhrase(String phrase,
                       CharSequence inputData) {
  return new SearchResults
    (phrase,
     "",
     // Perform the processing (either sequentially or in
     // parallel) and return a list of Results.
     new PhraseMatchTask(inputData,
               phrase).compute());
}
livelessons.utilsSearchResults<init>

Javadoc

Create an empty SearchResults, which is used to shutdown processing of the BlockingQueue.

Popular methods of SearchResults

  • toString
    Return a string version of the object.
  • getResultList
    Return the list of Results.
  • headerToString
    Convert to header to String form.
  • isEmpty
    Returns true if there are no search results.
  • size
    Returns the number of results.

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • String (java.lang)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JTable (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now