在android中,如何根据优先级对单个行中的多个值进行排序,类似于Excel中的排序功能?多值多优先级排序图
Map<String,String,Float,Integer> shoes; // Style, Color, Price, Quantity
shoes.put("Boots","Red",15.50,5);
shoes.put("Boots","Green",17.50,2);
shoes.put("Skate","Red",12.25,6);
shoes.put("Skate","Blue",13.05,9);
shoes.Sort(1,0,2,3); // sorts by color, then by style
shoes.Sort(2,0,1,3); // sorts by price, then by style
你确定你没有想创建一个Shoes对象并使用[Comparators](http://docs.oracle.com/javase/6/docs/api/java/util/Comparator.html)? – Thomas
我接受所有建议。任何代码示例都会有很大帮助。 –