@Test public void containsKey_returnsTrueForKeys() throws IOException { ImapList list = buildSampleList(); assertTrue(list.containsKey("ONE")); assertTrue(list.containsKey("TWO")); assertFalse(list.containsKey("THREE")); assertFalse(list.containsKey("nonexistent")); }
public boolean containsKey(String key) { if (key == null) { return false; } for (int i = 0, count = size() - 1; i < count; i++) { if (ImapResponseParser.equalsIgnoreCase(get(i), key)) { return true; } } return false; }
ImapList extends ArrayList<Object> { public boolean containsKey(String key) { if (key == null) { return false; } for (int i = 0, count = size() - 1; i < count; i++) { if (ImapResponseParser.equalsIgnoreCase(get(i), key)) { return true; } } return false; } }
ImapList extends ArrayList<Object> { public boolean containsKey(String key) { if (key == null) { return false; } for (int i = 0, count = size() - 1; i < count; i++) { if (ImapResponseParser.equalsIgnoreCase(get(i), key)) { return true; } } return false; }  }
ImapList extends ArrayList<Object> { public boolean containsKey(String key) { if (key == null) { return false; } for (int i = 0, count = size() - 1; i < count; i++) { if (ImapResponseParser.equalsIgnoreCase(get(i), key)) { return true; } } return false; }  ImapList getList(int index); boolean isList(int index); Object getObject(int index); String getString(int index); boolean isString(int index); long getLong(int index); int getNumber(int index); Date getDate(int index); Date getKeyedDate(String key); Object getKeyedValue(String key); ImapList getKeyedList(String key); String getKeyedString(String key); int getKeyedNumber(String key); boolean containsKey(String key); int getKeyIndex(String key); }
ImapList extends ArrayList<Object> { public boolean containsKey(String key) { if (key == null) { return false; } for (int i = 0, count = size() - 1; i < count; i++) { if (ImapResponseParser.equalsIgnoreCase(get(i), key)) { return true; } } return false; }  ImapList getList(int index); boolean isList(int index); Object getObject(int index); String getString(int index); boolean isString(int index); long getLong(int index); int getNumber(int index); Date getDate(int index); Date getKeyedDate(String key); Object getKeyedValue(String key); ImapList getKeyedList(String key); String getKeyedString(String key); int getKeyedNumber(String key); boolean containsKey(String key); int getKeyIndex(String key);  }