code: void removeDeadEndTransitions()
      {
          Iterator<CharRange> it = transitions.keySet().iterator();
          while (it.hasNext())
          {
              CharRange r = it.next();
              if (transitions.get(r).getTo().isDeadEnd())
              {
                  it.remove();
              }
          }
      }
docs: Removes transition to states that doesn't contain any outbound transition
  and that are not accepting states