请帮我实现这2个方法,谢谢。

请帮我实现这2个方法,谢谢。要求代码越少越好,可以另外再添加类或方法

[color=red]/**
*根据id将Ms们进行排序(id由大到小)
*/
public List orderbyid(List list);

/**
*每个国家各选一个id最高的Ms,放到list中,再排序(按id由大到小)返回
*/
public List getMaxIdOfEveryCountry(List list); [/color]

------具体代码如下--------------

[code="java"]Java code
Class Ms{
long id;
String country;//国家
long age;//年龄
long temperament;//气质
long beauty;//美丽

public Ms(long id,String country,long age,long temperament,long beauty){
this.id=id;
this.country=country;//国家
this.age=age;//年龄
this.temperament=temperament;//气质
this.beauty=beauty;//美丽
}

}

Interface Select{ // 选美
/**
*根据id将Ms们进行排序(id由大到小)
*/
public List orderbyid(List list);

/**
*每个国家各选一个id最高的Ms,放到list中,再排序(按id由大到小)返回
*/
public List getMaxIdOfEveryCountry(List list);

}

Class Judge implements Select{//评委

/**
*根据id将Ms们进行排序(id由大到小)
*/
public List orderbyid(List list){
//这边怎么实现啊?代码越少越好。
}

/**
*根据id将Ms们进行排序(id由大到小)
*/
public List orderbyid(List list){
//这边怎么实现啊?代码越少越好。
}

public static void main(String[] args){
Ms c1=new Ms(1,"China",23,100,100);
Ms c2=new Ms(2,"China",21,100,100);
Ms s1=new Ms(3,"Singapore",23,100,100);
Ms i1=new Ms(4,"Iran",24,100,100);
Ms i2=new Ms(5,"Iran",24,100,100);
Ms s2=new Ms(6,"Singapore",24,100,100);
Ms[] mses=new Ms;
//toArray;

Judge j=new Judge();
//测试
Judge.orderbyid(list);
Judge.getMaxIdOfEveryCountry(list);

}

}[/code]

[code="java"]
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

class Ms implements Comparable{
long id;
String country;// 国家
long age;// 年龄
long temperament;// 气质
long beauty;// 美丽

public Ms(long id, String country, long age, long temperament, long beauty) {
    this.id = id;
    this.country = country;// 国家
    this.age = age;// 年龄
    this.temperament = temperament;// 气质
    this.beauty = beauty;// 美丽
}

public int compareTo(Object o) {
    return (int)(((Ms)o).id-this.id);
}

}

interface Select { // 选美
/**
* 根据id将Ms们进行排序(id由大到小)
*/
public List orderbyid(List list);

/**
 * 每个国家各选一个id最高的Ms,放到list中,再排序(按id由大到小)返回
 */
public List getMaxIdOfEveryCountry(List list);

}

public class Judge implements Select {// 评委

/**
 * 根据id将Ms们进行排序(id由大到小)
 */
@SuppressWarnings("unchecked")
public List getMaxIdOfEveryCountry(List list) {
    Collections.sort(list);
    Map m=new HashMap();
    List<Ms> L=new ArrayList();
    for(int i=0;i<list.size();i++){
        if(!m.containsKey(((Ms)list.get(i)).country)){
            L.add((Ms)list.get(i));
            m.put(((Ms)list.get(i)).country, list.get(i));
        }
    }
    return L;
    // 这边怎么实现啊?代码越少越好。
}

/**
 * 根据id将Ms们进行排序(id由大到小)
 */
@SuppressWarnings("unchecked")
public List orderbyid(List list) {
    Collections.sort(list);
    return list;
    // 这边怎么实现啊?代码越少越好。
}

public static void main(String[] args) {
    Ms c1 = new Ms(1, "China", 23, 100, 100);
    Ms c2 = new Ms(2, "China", 21, 100, 100);
    Ms s1 = new Ms(3, "Singapore", 23, 100, 100);
    Ms i1 = new Ms(4, "Iran", 24, 100, 100);
    Ms i2 = new Ms(5, "Iran", 24, 100, 100);
    Ms s2 = new Ms(6, "Singapore", 24, 100, 100);
    Ms[] mses = new Ms[] { c1, c2, s1, s2, i1, i2 };
    // toArray;
    List list = new ArrayList();
    for (Ms mm : mses) {
        list.add(mm);
    }
    Judge j = new Judge();
    // 测试
    List<Ms> list1=j.orderbyid(list);
    for(Ms ms:list1){
        System.out.println(ms.id+" "+ms.country);
    }
    System.out.println();
    List<Ms> list2=j.getMaxIdOfEveryCountry(list);
    for(Ms ms:list2){
        System.out.println(ms.id+" "+ms.country);
    }
}

}

[/code]