继承comparable接口,并覆盖comparableTo方法,并使用collections.sort方法排序 http://blog.csdn.net/tjcyjd/article/details/6804690