question: public void sortByWeight ( String [ ] attributeNames , int direction , int comparatorType ) { Arrays . sort ( attributeNames , new WeightComparator ( direction , comparatorType ) ) ; }
target:  Sorts the given array of attribute names according to their weight, the sorting direction (ascending or descending), and with respect to the fact if original or absolute weights should be used. Ascending means that the attributes with the smallest weights come first.