Class CaseInsensitiveKeysMapAccess

java.lang.Object
org.apache.jackrabbit.oak.segment.azure.util.CaseInsensitiveKeysMapAccess

public class CaseInsensitiveKeysMapAccess extends Object
Wrapper around the map that allows accessing the map with case-insensitive keys. For example, the keys 'hello' and 'Hello' access the same value.

If there is a conflicting key, any one of the keys and any one of the values is used. Because of the nature of Hashmaps, the result is not deterministic.

  • Constructor Details

    • CaseInsensitiveKeysMapAccess

      public CaseInsensitiveKeysMapAccess()
  • Method Details

    • convert

      public static Map<String,String> convert(Map<String,String> map)
      Wrapper around the map that allows accessing the map with case-insensitive keys.

      Return an unmodifiable map to make it clear that changes are not reflected to the original map.

      Parameters:
      map - the map to convert
      Returns:
      an unmodifiable map with case-insensitive key access