0
我有一個哈希表「listUserEvents',這是形式的字符串,矢量操作。我想看看是否哈希表對給定字符串的一些數據或沒有。執行包含哈希表
listUserEvents = getUserInfo();
for (int i = 0; i < compareEventData.size(); i++) {
EventData eventForExistingDate = (EventData) compareEventData.elementAt(i);
//here i want to check if listUserEvents the hashtable has eventForExistingDate.getSummary() for string "hello"
}
如何?執行此
listUserEvents = getUserInfo(); \t \t枚舉e = listUserEvents.keys(); \t \t向量值=空; (e.hasMoreElements()){ \t \t \t value =(Vector)listUserEvents.get(compareKey); \t \t} – harqs
我想檢查哈希表是否具有鍵值「hello」 – harqs
@harqs:好,已編輯 - 但不清楚eventForExistingDate現在在哪裏進入...... –