code: public void setGranularity(Granularity granularity) {
          Interval interval = getInterval();
          if (interval != null) {
              resetInterval(interval.getMinStart(), granularity);
          } else {
              resetInterval(null, granularity);
          }
      }
docs: Sets the granularity of this parameter's timestamp.
  
  @param granularity
  a {@link Granularity} object.