public static RRule parseRRuleString(String rRuleString) {
    RRule.Builder builder = RRule.builder();
    List<String> components = Arrays.asList(rRuleString.split("[;:]"));
    Map<ByRule, String> byRuleMapInput = new HashMap<>();
    for (String property : components) {
      Preconditions.checkArgument(property.contains("="), "Cannot parse " + property);
      String[] split = property.split("=");
      String key = split[0];
      String value = split[1];
      if (key.equals(FREQ)) {
        builder.freq(Freq.valueOf(value));
      } else if (key.equals(UNTIL)) {
        builder.until(value); // TODO(olsona): consider parsing further?
      } else if (key.equals(COUNT)) {
        builder.count(Integer.parseInt(value));
      } else if (key.equals(INTERVAL)) {
        builder.interval(Integer.parseInt(value));
      } else if (byRuleList.contains(key)) {
        byRuleMapInput.put(ByRule.valueOf(key), value);
      } else if (key.equals(WKST)) {
        builder.wkst(Day.valueOf(value));
      }
    }
    if (!byRuleMapInput.isEmpty()) {
      builder.byRuleMap(byRuleMapInput);
    }
    return builder.build();
  }
A method for turning an RRule string into an {@link RRule}.

@param rRuleString a string containing RRule information, excluding the RRULE prefix
@return an {@link RRule}
portability-types-common/src/main/java/org/datatransferproject/types/common/models/calendar/RecurrenceRule.java