code: private void dispose(Collection<Transformer> elements) {
          if (elements != null) {
              for (Transformer<?, ?> element : elements) {
                  if (element instanceof Disposable) {
                      ((Disposable) element).dispose();
                  }
              }
              elements.clear();
          }
      }
docs: Disposes the elements of the specified collection.
  
  @param elements Elements to be disposed.