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