org.eucalyptus.analysesi.util
Class IterableEnumeration<T>

java.lang.Object
  extended by org.eucalyptus.analysesi.util.IterableEnumeration<T>
All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Iterator<T>

public class IterableEnumeration<T>
extends java.lang.Object
implements java.lang.Iterable<T>, java.util.Iterator<T>

Un Wrapper d'une Enumeration vers un Iterable.

Author:
Loic Dreux

Constructor Summary
IterableEnumeration(java.util.Enumeration<T> enumeration)
          Constructeur de IterableEnumeration.
 
Method Summary
 boolean hasNext()
           
static
<T> java.lang.Iterable<T>
iterate(java.util.Enumeration<T> enumeration)
          Transforme une Enumeration en Iterable.
 java.util.Iterator<T> iterator()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterableEnumeration

public IterableEnumeration(java.util.Enumeration<T> enumeration)
Constructeur de IterableEnumeration.

Parameters:
enumeration -
Method Detail

iterate

public static <T> java.lang.Iterable<T> iterate(java.util.Enumeration<T> enumeration)
Transforme une Enumeration en Iterable.

Parameters:
enumeration - L'énumération
Returns:
un Iterable

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<T>

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>

next

public T next()
Specified by:
next in interface java.util.Iterator<T>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<T>


Copyright © 2009. All Rights Reserved.