Class FastIndexReader<U>

java.lang.Object
es.uam.eps.ir.relison.io.index.FastIndexReader<U>
Type Parameters:
U - Type of the elements to read in the index.
All Implemented Interfaces:
IndexReader<U>

public class FastIndexReader<U>
extends java.lang.Object
implements IndexReader<U>
Reads an index from a file.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private org.ranksys.formats.parsing.Parser<U> parser
    A parser.
  • Constructor Summary

    Constructors 
    Constructor Description
    FastIndexReader​(org.ranksys.formats.parsing.Parser<U> parser)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    Index<U> read​(java.io.InputStream stream)
    Reads an index from an input stream.
    Index<U> read​(java.lang.String file)
    Reads an index from a file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • parser

      private final org.ranksys.formats.parsing.Parser<U> parser
      A parser.
  • Constructor Details

    • FastIndexReader

      public FastIndexReader​(org.ranksys.formats.parsing.Parser<U> parser)
      Constructor.
      Parameters:
      parser - a parser, for reading the elements in the index.
  • Method Details

    • read

      public Index<U> read​(java.lang.String file)
      Description copied from interface: IndexReader
      Reads an index from a file.
      Specified by:
      read in interface IndexReader<U>
      Parameters:
      file - the file.
      Returns:
      the index if everything is OK, null otherwise.
    • read

      public Index<U> read​(java.io.InputStream stream)
      Description copied from interface: IndexReader
      Reads an index from an input stream.
      Specified by:
      read in interface IndexReader<U>
      Parameters:
      stream - the stream.
      Returns:
      the index if everything is OK, null otherwise.