---
title: "List<Map<>>排序（根据日期）"
author: "cm1993"
date: "2015-11-04T16:04:04Z"
tags: []
categories: ["编程语言"]
slug: "list-map"
draft: false
lastmod: "2015-11-04T16:04:04Z"
id: 2254432
url: "https://cm1993.iteye.com/blog/2254432"
---

	Collections.sort(mapBroadcom, new Comparator<Map<Integer, String>>() 
		{
            public int compare(Map<Integer, String> o1, Map<Integer, String> o2) 
            {
            	Date date1 = null;
            	Date date2 = null;
            	try
				{
					date1 = format2.parse(o1.get(15));
					date2 = format2.parse(o2.get(15));
				} catch (ParseException e)
				{
					e.printStackTrace();
				}
            	return date1.compareTo(date2);
            }
		});