Class SimpleIndex


  • public class SimpleIndex
    extends java.lang.Object
    An index mapping keys of type Long to lists of postings of generic data.
    Author:
    Magnar Nedland, bjorncs
    • Constructor Detail

      • SimpleIndex

        public SimpleIndex​(org.eclipse.collections.api.map.primitive.LongObjectMap<SimpleIndex.Entry> dictionary)
    • Method Detail

      • getPostingList

        public SimpleIndex.Entry getPostingList​(long key)
        Retrieves a posting list for a given key
        Parameters:
        key - the key to lookup
        Returns:
        list of postings
      • writeToOutputStream

        public void writeToOutputStream​(java.io.DataOutputStream out)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • fromInputStream

        public static SimpleIndex fromInputStream​(java.io.DataInputStream in)
                                           throws java.io.IOException
        Throws:
        java.io.IOException