code: public void setSlidingWindowWidthMode(
              SlidingWindowWidthMode slidingWindowWidthMode) {
          if (slidingWindowWidthMode == null) {
              throw new IllegalArgumentException(
                      "slidingWindowWidthMode cannot be null");
          }
          if (slidingWindowWidthMode == SlidingWindowWidthMode.DEFAULT
                  && this.algorithmId == null) {
              throw new IllegalArgumentException(
                      "slidingWindowWidthMode cannot be DEFAULT when no algorithm has been specified.");
          }
  
          this.slidingWindowWidthMode = slidingWindowWidthMode;
      }
docs: Sets the sliding window width mode. If the <code>algorithmId</code> is
  <code>null</code>, a value of {@link SlidingWindowWidthMode.DEFAULT}
  is not permitted.
  
  @param slidingWindowWidthMode
  a {@link SlidingWindowWidthMode}. Cannot be <code>null</code>.