1 MAP循环同时删除 for (Long key:tsResult.keySet()){ if (key.longValue() < startTs){ tsResult.remove(key); } }