2222

void Jisuan()throws Exception
{
map = new HashMap<String,Integer>();
for(String line : list)
{
if(line == null)
{
continue;
}
String[] strs = line.split(",");
if(strs.length<4)
{
continue;
}
if(strs[2].length()<2)
{
continue;
}
Integer sum = map.get(strs[2]);
if(sum==null)
{
sum = 0;
}
if(isDAYU20(strs))
{
sum++;
}
map.put(strs[2], sum);
}
}

boolean isDAYU20(String[] strs)throws Exception
{

for(String str:strs)
{
if(!str.contains(":"))
{
continue;
}
String [] tempStrs = str.split(":");
if(Integer.parseInt(tempStrs[0])>=20)
{
return true;
}
}
return false;
}

你可能感兴趣的:(2222)