翻译为java代码 WashWay washWay = 0; foreach (var item in items) { washWay |= Consts.WashWayMap.ContainsKey(item.ToString()) ? Consts.WashWayMap[item.ToString()] : 0; }
时间: 2024-02-10 15:35:26 浏览: 49
一个友好的.改善的 Object.prototype.toString的实现
WashWay washWay = WashWay.NONE;
for (Object item : items) {
if (Consts.WashWayMap.containsKey(item.toString())) {
washWay |= Consts.WashWayMap.get(item.toString());
} else {
washWay |= WashWay.NONE;
}
}
阅读全文