Java tutorial
//package com.java2s; import java.util.Dictionary; import java.util.Enumeration; public class Main { public static final <T, K> boolean containsKey(Dictionary<T, K> collection, T key) { Enumeration<T> e = collection.keys(); while (e.hasMoreElements()) { if (e.nextElement().equals(key)) { return true; } } return false; } }