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

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