code: public static DayPeriod of(Map<PlainTime, String> timeToLabels) {
  
          if (timeToLabels.isEmpty()) {
              throw new IllegalArgumentException("Label map is empty.");
          }
  
          SortedMap<PlainTime, String> map = new TreeMap<>(timeToLabels);
  
          for (PlainTime key : timeToLabels.keySet()) {
              if (key.getHour() == 24) {
                  map.put(PlainTime.midnightAtStartOfDay(), timeToLabels.get(key));
                  map.remove(key);
              } else if (timeToLabels.get(key).isEmpty()) {
                  throw new IllegalArgumentException("Map has empty label: " + timeToLabels);
              }
          }
  
          return new DayPeriod(null, "", map);
  
      }
docs: /*[deutsch]
  <p>Erzeugt eine Instanz, die auf benutzerdefinierten Daten beruht. </p>
  
  @param   timeToLabels    map containing the day-periods where the keys represent starting points
  and the values represent the associated labels intended for representation
  @return  user-specific instance
  @throws  IllegalArgumentException if given map is empty or contains empty values
  @since   3.13/4.10