code: void optimizeTransitions()
      {
          HashMap<DFAState<T>,RangeSet> hml = new HashMap<>();
          for (Transition<DFAState<T>> t : transitions.values())
          {
              RangeSet rs = hml.get(t.getTo());
              if (rs == null)
              {
                  rs = new RangeSet();
                  hml.put(t.getTo(), rs);
              }
              rs.add(t.getCondition());
          }
          transitions.clear();
          for (DFAState<T> dfa : hml.keySet())
          {
              RangeSet rs = RangeSet.merge(hml.get(dfa));
              for (CharRange r : rs)
              {
                  addTransition(r, dfa);
              }
          }
      }
docs: Optimizes transition by merging ranges