package com.milaboratory.core.sequence;

import gnu.trove.map.hash.TCharObjectHashMap;

final class WildcardMapBuilder {
    final TCharObjectHashMap<WildcardSymbol> map = new TCharObjectHashMap<>();

    WildcardMapBuilder addWildcard(char c, byte... codes) {
        map.put(c, new WildcardSymbol(c, codes));
        return this;
    }

    WildcardMapBuilder addAlphabet(Alphabet alphabet) {
        for (byte i = 0; i < alphabet.size(); ++i) {
            char c = alphabet.symbolFromCode(i);
            map.put(c, new WildcardSymbol(c, i));
        }
        return this;
    }

    TCharObjectHashMap<WildcardSymbol> get() {
        return map;
    }
}

@@ -81,16 +81,111 @@
 shMap;%0A%0A
+import static java.lang.Character.toLowerCase;%0Aimport static java.lang.Character.toUpperCase;%0A%0A
 final cl
@@ -353,34 +353,83 @@
 ) %7B%0A        
-map.put(c,
+char uC = toUpperCase(c);%0A        WildcardSymbol wcSymbol =
  new Wildcar
@@ -440,17 +440,18 @@
 bol(
-c
+uC
 , codes)
 );%0A 
@@ -446,16 +446,89 @@
 , codes)
+;%0A        map.put(toLowerCase(c), wcSymbol);%0A        map.put(uC, wcSymbol
 );%0A     

Fix for wildcards.