org.apache.lucene.facet.taxonomy.writercache.cl2o
Class CollisionMap

java.lang.Object
  extended by org.apache.lucene.facet.taxonomy.writercache.cl2o.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 Summary
CollisionMap(org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)
           
CollisionMap(int initialCapacity, org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)
           
 
Method Summary
 int addLabel(CategoryPath label, int hash, int cid)
           
 int addLabel(CategoryPath label, int prefixLen, int hash, int cid)
           
 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.
 int capacity()
           
 int get(CategoryPath label, int hash)
           
 int get(CategoryPath label, int prefixLen, int hash)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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.



Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.