code: public static Map < Character, Integer > getPictureCharOccurences(
              final String picture, final char currencySymbol) {
  
          Map < Character, Integer > charNum = new HashMap < Character, Integer >();
          charNum.put('A', 0);
          charNum.put('B', 0);
          charNum.put('G', 0);
          charNum.put('N', 0);
          charNum.put('X', 0);
          charNum.put('P', 0);
          charNum.put('Z', 0);
          charNum.put('0', 0);
          charNum.put('/', 0);
          charNum.put('+', 0);
          charNum.put('-', 0);
          charNum.put('*', 0);
          charNum.put('C', 0);
          charNum.put('D', 0);
          charNum.put('.', 0);
          charNum.put(',', 0);
          charNum.put('9', 0);
          charNum.put('E', 0);
          charNum.put('S', 0);
          charNum.put('V', 0);
          charNum.put(currencySymbol, 0);
  
          List < PictureSymbol > pictureSymbols = parsePicture(picture,
                  currencySymbol);
          for (PictureSymbol pictureSymbol : pictureSymbols) {
              Integer number = charNum.get(pictureSymbol.getSymbol());
              if (number != null) {
                  number += pictureSymbol.getNumber();
                  charNum.put(pictureSymbol.getSymbol(), number);
              }
          }
  
          return charNum;
      }
docs: Determines how many times a given character occurs in a picture string. A
  character can appear standalone or as a factored sequence like X(nn).
  Unlike all other picture symbols, currency symbols are case sensitive.
  For example, &apos;D&apos; and &apos;d&apos; specify different currency
  symbols.
  
  @param picture the picture string
  @param currencySymbol the currency symbol
  @return a map of all characters to search for