code: public Timespan filter(EnumSet<TimeUnit> timeUnits) {
          Timespan res = null;
  
          EnumMap<TimeUnit, Timespan> canonicalTimespans = getCanonicalTimespans();
  
          for (TimeUnit timeUnit : TIME_UNIT_ORDER) {
              if (timeUnits.contains(timeUnit)) {
                  Timespan timespan = canonicalTimespans.get(timeUnit);
                  if (timespan != null && timespan.getDuration() > 0) {
                      if (res == null) {
                          res = timespan;
                      } else {
                          res = res.add(timespan);
                      }
                  }
              }
          }
  
          // in case there is no match we return with smallest timeunit provided
          if (res == null) {
              res = ZERO_TIMESPANS.get(timeUnits.iterator().next());
          }
  
          return res;
      }
docs: Filters this timespan with only the unit provided. It computes the canonical representation
  and keeps only the units that are present in the filter. Example: if this timespan represents
  3d2h25m10s and filter is d/h/m then result is 3d2h25m.
  
  @param timeUnits
  the time units you want to keep in the filtering.
  
  @return the timespan after the filtering