Class CompactCIHashMap<K,V>

java.lang.Object
com.cedarsoftware.util.CompactMap<K,V>
com.cedarsoftware.util.CompactCIHashMap<K,V>
Type Parameters:
K - the type of keys maintained by this map
V - the type of mapped values
All Implemented Interfaces:
Map<K,V>

@Deprecated public class CompactCIHashMap<K,V> extends CompactMap<K,V>
Deprecated.
As of Cedar Software java-util 2.19.0, replaced by CompactMap with builder pattern configuration.

Example replacement:
Instead of: Map<String, String> map = new CompactCIHashMap<>();
Use: Map<String, String> map = CompactMap.newMap(80, false, 16, CompactMap.UNORDERED);

This creates a CompactMap with:

  • compactSize = 80 (same as CompactCIHashMap)
  • caseSensitive = false (case-insensitive behavior)
  • capacity = 16 (default initial capacity)
  • ordering = UNORDERED (standard hash map behavior)

A case-insensitive Map implementation that uses a compact internal representation for small maps.
Author:
John DeRegnaucourt ([email protected])
Copyright (c) Cedar Software LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

License

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  • Constructor Details

    • CompactCIHashMap

      public CompactCIHashMap()
      Deprecated.
    • CompactCIHashMap

      public CompactCIHashMap(Map<K,V> other)
      Deprecated.
  • Method Details

    • getNewMap

      protected Map<K,V> getNewMap()
      Deprecated.
      Description copied from class: CompactMap
      Creates the backing map instance when size exceeds compactSize.

      Default implementation returns HashMap. Override to provide different map implementation (e.g., TreeMap for sorted maps, LinkedHashMap for insertion ordered maps).

      Overrides:
      getNewMap in class CompactMap<K,V>
      Returns:
      new empty map instance for backing storage
    • isCaseInsensitive

      protected boolean isCaseInsensitive()
      Deprecated.
      Description copied from class: CompactMap
      Determines if String keys are compared case-insensitively.

      Default implementation returns false (case-sensitive). Override to change String key comparison behavior. Affects key equality and sorting.

      Overrides:
      isCaseInsensitive in class CompactMap<K,V>
      Returns:
      true if String keys should be compared ignoring case, false otherwise
    • useCopyIterator

      protected boolean useCopyIterator()
      Deprecated.