package com.hssx.cloudmodel.util; import com.hssx.cloudmodel.entity.vo.MouldHistoryVO; import java.sql.SQLOutput; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /** * Author: 吴涛涛 cuiyi@itany.com * Date : 2019 - 10 - 12 16:34 * Description:<描述> * Version: 1.0 */ public class TimeAndCountUtil { public static Set getSet(){ Set set = new HashSet<>(); for(int i=0 ;i<=23 ;i++){ MouldHistoryVO vo = new MouldHistoryVO(); String iStr = i<10 ? ("0"+i):i+""; int i1 = i+1; String iStrAfterOne = (i1)<10 ? ("0"+i1):i1+""; vo.setTime(iStr+":00-"+iStrAfterOne+":00"); vo.setRunCnt(0); set.add(vo); } return set; } public static Map getMap(){ Map map = new HashMap<>(); for(int i=0 ;i<=23 ;i++){ MouldHistoryVO vo = new MouldHistoryVO(); String iStr = i<10 ? ("0"+i):i+""; int i1 = i+1; String iStrAfterOne = (i1)<10 ? ("0"+i1):i1+""; map.put(iStr+":00-"+iStrAfterOne+":00",0); } return map; } public static void main(String[] args) { System.out.println(TimeAndCountUtil.getMap()); } }