public TopNMetric(TopNMetricType type,String previousStop,SortDirection order){
  this(type,previousStop);
  if (order == SortDirection.ASC) {
    this.type=TopNMetricType.INVERTED;
    this.nested=Optional.of(new TopNMetric(type,previousStop));
    this.previousStop=Optional.empty();
  }
}

public TopNMetric ( TopNMetricType type , String previousStop , SortDirection order ) { this ( type , previousStop ) ; if ( order == SortDirection . ASC ) { this . type = TopNMetricType . INVERTED ; this . nested = Optional . of ( new TopNMetric ( type , previousStop ) ) ; this . previousStop = Optional . empty ( ) ; } }
constructs a sort of the given type with a starting point and explicitly specifies the order ( ascending or descending ) .
