code: public Set<Transition<NFAState<T>>> getSingleTransitionTo(NFAState<T> state)
      {
          Set<Transition<NFAState<T>>> set = new HashSet<>();
          if  (transitions.size() != 1)
          {
              return null;
          }
          for (CharRange range : transitions.keySet())
          {
              Set<Transition<NFAState<T>>> s = transitions.get(range);
              for (Transition<NFAState<T>> tr : s)
              {
                  if (state.equals(tr.getTo()))
                  {
                      set.add(tr);
                  }
                  else
                  {
                      return null;    // to somewhere else
                  }
              }
          }
          if (set.isEmpty())
          {
              return null;
          }
          else
          {
              return set;
          }
      }
docs: Returns Transition set instance if NFAState<T> has only transitions to given
  state and no transitions to anywhere else. Otherwise returns null.
  @param state
  @return