org.apache.lucene.facet.taxonomy.writercache

## Class CollisionMap

- java.lang.Object
- - org.apache.lucene.facet.taxonomy.writercache.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.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `addLabel(FacetLabel label, int hash, int cid)` Add another mapping.
    `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()` How many slots are allocated.
    `int` | `get(FacetLabel label, int hash)` Return the mapping, or `LabelToOrdinal.INVALID_ORDINAL` if the label isn't recognized.
    `int` | `size()` How many mappings.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### size

          public int size()

      How many mappings.

    - #### capacity

          public int capacity()

      How many slots are allocated.

    - #### get

          public int get(FacetLabel label,
                         int hash)

      Return the mapping, or `LabelToOrdinal.INVALID_ORDINAL` if the label isn't recognized.

    - #### addLabel

          public int addLabel(FacetLabel label,
                              int hash,
                              int cid)

      Add another mapping.

    - #### 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-2019 Apache Software Foundation. All Rights Reserved.