Class CharArrayMap<V>

  • All Implemented Interfaces:
    Map<Object,​V>

    public class CharArrayMap<V>
    extends AbstractMap<Object,​V>
    A simple class that stores key Strings as char[]'s in a hash table. Note that this is not a general purpose class. For example, it cannot remove items from the map, nor does it resize its hash table to be smaller, etc. It is designed to be quick to retrieve items by char[] keys without the necessity of converting to a String first.

    You must specify the required Version compatibility when creating CharArrayMap:

    • As of 3.1, supplementary characters are properly lowercased.
    Before 3.1 supplementary characters could not be lowercased correctly due to the lack of Unicode 4 support in JDK 1.4. To use instances of CharArrayMap with the behavior before Lucene 3.1 pass a Version < 3.1 to the constructors.
    • Constructor Detail

      • CharArrayMap

        public CharArrayMap​(Version matchVersion,
                            int startSize,
                            boolean ignoreCase)
        Create map with enough capacity to hold startSize terms
        Parameters:
        matchVersion - compatibility match version see Version note above for details.
        startSize - the initial capacity
        ignoreCase - false if and only if the set should be case sensitive otherwise true.
      • CharArrayMap

        public CharArrayMap​(Version matchVersion,
                            Map<?,​? extends V> c,
                            boolean ignoreCase)
        Creates a map from the mappings in another map.
        Parameters:
        matchVersion - compatibility match version see Version note above for details.
        c - a map whose mappings to be copied
        ignoreCase - false if and only if the set should be case sensitive otherwise true.