code: @Nullable
      public static HourRanges valueOf(@Nullable final String str) {
          if (str == null) {
              return null;
          }
          return new HourRanges(str);
      }
docs: Converts a given string into an instance of this class.
  
  @param str
  String to convert.
  
  @return New instance.