Set<SubSystemType> types, String dir) {
Map<SubSystemType, CgroupCore> result = new HashMap<SubSystemType, CgroupCore>();
for (SubSystemType type : types) {
switch (type) {
case blkio:
result.put(SubSystemType.blkio, new BlkioCore(dir));
break;
case cpuacct:
result.put(SubSystemType.cpuacct, new CpuacctCore(dir));
break;
case cpuset: