Code example for Collection

Methods: iterator

   public V getFirstValue(K key) {
	   Collection<V> values = getList(key, false);
	   if (ListUtil.isEmpty(values)) {
		   return null; 
	   return values.iterator().next();
    * Returns the first object with this key and removes it from the Hashtable 
    * @param key 
    * @return 
   public V getAndRemove(K key) {
      V obj = getFirstValue(key);
Connect your IDE to all the code out there  Get Codota for Java