All pastes #2132287 Raw Edit

Stuff

public text v1 · immutable
#2132287 ·published 2012-03-26 19:35 UTC
rendered paste body
    public static <T> void printMap(Iterator<T> it)
    {
    	
    	while(it.hasNext())
    	{
    		T obj = it.next();
    		if( obj instanceof Map.Entry)
    		{
    			Map.Entry ent = (Map.Entry) obj;
    			System.out.println(ent.getKey() + " => " + ent.getValue());
    		
    		} else
    		{
    			throw new IllegalArgumentException("Not an map Iterator");
    		}
    	}
    	
    	
    }