private static boolean insensitiveEquals(String a, String b) {
        if (a.length() != b.length())
            return false;

        for (int i = 0; i < a.length(); i++) {
            char charA = a.charAt(i);
            char charB = b.charAt(i);
            // If characters match, just continue
            if (charA == charB)
                continue;
            // If charA is upper and we didn't already match above
            // then charB may be lower (and possibly still not match).
            if (charA >= 'A' && charA <= 'Z' && (charA + 32 != charB))
                return false;
            // If charB is upper and we didn't already match above
            // then charA may be lower (and possibly still not match).
            if (charB >= 'A' && charB <= 'Z' && (charB + 32 != charA))
                return false;
            // Otherwise matches
        }
        return true;
    }
A simple multimap able to accept multiple values for a given key.
<p>
The implementation is specifically tuned for headers (such as HTTP), where
the number of entries tends to be moderate, but are frequently accessed.
</p>
<p>
This map expects ASCII for key strings.
</p>
<p>
Case is ignored (avoiding {@link String#toLowerCase()} <code>String</code> allocation)
before being hashed (<code>xxHash</code>).
</p>
<p>
    Constraints:
<ul>
  <li><strong>Not thread-safe.</strong></li>
  <li><tt>Null</tt> is <strong>not</strong> a valid key.</li>
</ul>
</p>

@author Marc Savy {@literal <msavy@redhat.com>}
gateway/engine/beans/src/main/java/io/apiman/gateway/engine/beans/util/CaseInsensitiveStringMultiMap.java