Class CollisionMap


  • public class CollisionMap
    extends Object
    HashMap to store colliding labels. See CompactLabelToOrdinal for details.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • CollisionMap

        public CollisionMap​(org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)
      • CollisionMap

        public CollisionMap​(int initialCapacity,
                            org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)
    • Method Detail

      • size

        public int size()
      • capacity

        public int capacity()
      • get

        public int get​(CategoryPath label,
                       int prefixLen,
                       int hash)
      • addLabel

        public int addLabel​(CategoryPath label,
                            int hash,
                            int cid)
      • addLabel

        public int addLabel​(CategoryPath label,
                            int prefixLen,
                            int hash,
                            int cid)
      • addLabelOffset

        public void addLabelOffset​(int hash,
                                   int offset,
                                   int cid)
        This method does not check if the same value is already in the map because we pass in an char-array offset, so so we now that we're in resize-mode here.