Mercurial > hg > Database > Christie
view src/main/java/christie/topology/manager/TopologyManagerConfig.java @ 46:21cf500585d1
fix arg option
author | akahori |
---|---|
date | Tue, 07 Aug 2018 11:50:25 +0900 |
parents | cf5a75bc3e55 |
children | 174a2f37ec28 |
line wrap: on
line source
package christie.topology.manager; public class TopologyManagerConfig { public boolean showTime = false; public String confFilePath; public TopologyType type = TopologyType.Tree; public int hasChild = 2; public TopologyManagerConfig(String[] args) { for (int i = 0; i < args.length; i++) { if ("--confFile".equals(args[i])) { confFilePath = args[++i]; } else if ("--topology".equals(args[i])) { String typeName = args[++i]; if ("tree".equals(typeName)) { type = TopologyType.Tree; } } else if ("--child".equals(args[i])) { hasChild = Integer.parseInt(args[++i]); } else if ("--showTime".equals(args[i])) { showTime = true; } } } }