class TextInstructions {

  public String laneConfig(LegStep step) {
    if (step.getIntersections() == null
      || step.getIntersections().size() == 0
      || step.getIntersections().get(0).getLanes() == null
      || step.getIntersections().get(0).getLanes().length == 0) {
      throw new RuntimeException("No lanes object");
    }

    StringBuilder config = new StringBuilder();
    Boolean currentLaneValidity = null;
    for (IntersectionLanes lane : step.getIntersections().get(0).getLanes()) {
      if (currentLaneValidity == null || currentLaneValidity != lane.getValid()) {
        if (lane.getValid()) {
          config.append("o");
        } else {
          config.append("x");
        }
        currentLaneValidity = lane.getValid();
      }
    }

    return config.toString();
  }

  public  TextInstructions(String language, String version);

}