Class CollisionMap
- java.lang.Object
-
- org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap
-
public class CollisionMap extends Object
HashMap to store colliding labels. SeeCompactLabelToOrdinalfor details.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description CollisionMap(int initialCapacity, org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)CollisionMap(org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddLabel(CategoryPath label, int hash, int cid)intaddLabel(CategoryPath label, int prefixLen, int hash, int cid)voidaddLabelOffset(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.intcapacity()intget(CategoryPath label, int hash)intget(CategoryPath label, int prefixLen, int hash)intsize()
-
-
-
Method Detail
-
size
public int size()
-
capacity
public int capacity()
-
get
public int get(CategoryPath label, int hash)
-
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.
-
-