001    package com.ochafik.util;
002    import java.util.Enumeration;
003    import java.util.Iterator;
004    @SuppressWarnings("unchecked")
005    public class IteratorEnumeration implements Enumeration {
006            Iterator it;
007            public IteratorEnumeration(Iterator it) {
008                    this.it=it;
009            }
010            public boolean hasMoreElements() {
011                    return it.hasNext();
012            }
013            public Object nextElement() {
014                    return it.next();
015            }
016    }