Class DirectoryTaxonomyWriter.MemoryOrdinalMap

    • Constructor Detail

      • MemoryOrdinalMap

        public MemoryOrdinalMap()
    • Method Detail

      • setSize

        public void setSize​(int taxonomySize)
        Description copied from interface: DirectoryTaxonomyWriter.OrdinalMap
        Set the size of the map. This MUST be called before addMapping(). It is assumed (but not verified) that addMapping() will then be called exactly 'size' times, with different origOrdinals between 0 and size-1.
        Specified by:
        setSize in interface DirectoryTaxonomyWriter.OrdinalMap
      • getMap

        public int[] getMap()
        Description copied from interface: DirectoryTaxonomyWriter.OrdinalMap
        Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals. If the map has to be read from disk and ordered appropriately, it is done when getMap() is called. getMap() should only be called once, and only when the map is actually needed. Calling it will also free all resources that the map might be holding (such as temporary disk space), other than the returned int[].
        Specified by:
        getMap in interface DirectoryTaxonomyWriter.OrdinalMap