code: private static void put(State fromState, State toState, double weight, HashMap<Integer,Double>[] closure) {
      HashMap<Integer,Double> maybe = closure[fromState.getId()];
      if (maybe == null) {
        maybe = new HashMap<Integer,Double>();
        closure[fromState.getId()] = maybe;
      }
      maybe.put(toState.getId(), weight);
    }
docs: Put a new state in the epsilon closure