/** * Increments the number associated with a character in a map by 1 * * @param map the map of characters and their numbers * @param symbol the character whose number should be increment */ private static void increment(Map<Character, Integer> map, char symbol) { increment(map, symbol, 1); }
increment(escape, prev); increment(symbols, ch); } else if ((ch == '\r' || ch == '\n' || ch == normalizedNewLine) && symbols.size() > 0) { //got a newline and collected some symbols? Good! afterNewLine = true; increment(sums, symbol, Math.abs(previousCount - currentCount)); // we expect to always get 0 or close to 0 here, so the symbol occurs in all rows