OfRef(AbstractPipeline<?,T,?> upstream,Comparator<? super T> comparator){
  super(upstream,StreamShape.REFERENCE,StreamOpFlag.IS_ORDERED | StreamOpFlag.NOT_SORTED);
  this.isNaturalSort=false;
  this.comparator=Objects.requireNonNull(comparator);
}

OfRef ( AbstractPipeline < ? , T , ? > upstream , Comparator < ? super T > comparator ) { super ( upstream , StreamShape . REFERENCE , StreamOpFlag . IS_ORDERED | StreamOpFlag . NOT_SORTED ) ; this . isNaturalSort = false ; this . comparator = Objects . requireNonNull ( comparator ) ; }
sort using the provided comparator .
