我有一个清单:
class test
{
name,
timestamp
}
我想获得所有具有相同名称的最后(最新)测试。许多测试具有相同的时间戳。
例如:
name1, 2012-10-25 3:00PM
name1, 2012-10-25 3:00PM
name2, 2012-10-25 3:05PM
name2, 2012-10-25 3:05PM
name1, 2012-10-25 3:10PM
name1, 2012-10-25 3:10PM
name2, 2012-10-25 3:15PM
name2, 2012-10-25 3:15PM
我只需要获取每个名称的最后测试:
name1, 2012-10-25 3:10PM
name1, 2012-10-25 3:10PM
name2, 2012-10-25 3:15PM
name2, 2012-10-25 3:15PM