Code example for Enumeration

Methods: hasMoreElements

0
		return new Iterator<E>() {
 
			@Override 
			public boolean hasNext() { 
				return enumeration.hasMoreElements();
			} 
 
			@Override 
			public E next() { 
				return enumeration.nextElement();
			} 
 
			@Override 
			public void remove() { 
				throw new UnsupportedOperationException();
			} 
		}; 
	} 
 
	/** 
	 * Default private constructor to prevent instantiation by other classes.