Class IndexWriter.LongIndexCollectorUncompressed

  • Enclosing class:
    IndexWriter

    public static class IndexWriter.LongIndexCollectorUncompressed
    extends java.lang.Object
    Build a int to long index.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long get​(int index)
      Retrieve an entry.
      void set​(int index, long value)
      Add one entry.
      IIndexReader.IOne2LongIndex writeTo​(java.io.File indexFile)
      Write the in-memory mapping to disk and return a reader.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LongIndexCollectorUncompressed

        public LongIndexCollectorUncompressed​(int size)
        Construct a collector of the given size.
        Parameters:
        size - the number of entries
    • Method Detail

      • set

        public void set​(int index,
                        long value)
        Add one entry.
        Parameters:
        index - the int value
        value - the corresponding long
      • get

        public long get​(int index)
        Retrieve an entry.
        Parameters:
        index - the int key
        Returns:
        the long value
      • writeTo

        public IIndexReader.IOne2LongIndex writeTo​(java.io.File indexFile)
                                            throws java.io.IOException
        Write the in-memory mapping to disk and return a reader.
        Parameters:
        indexFile - the output file
        Returns:
        a reader for the index
        Throws:
        java.io.IOException - if a problem occurs with the write