1 22 package org.jnp.interfaces; 23 24 import java.util.Collection ; 25 import java.util.Iterator ; 26 27 import javax.naming.NamingEnumeration ; 28 29 36 public class NamingEnumerationImpl 37 implements NamingEnumeration 38 { 39 41 Iterator iter; 43 44 46 NamingEnumerationImpl(Collection list) 48 { 49 iter = list.iterator(); 50 } 51 52 54 public boolean hasMoreElements() 56 { 57 return iter.hasNext(); 58 } 59 60 public Object nextElement() 61 { 62 return iter.next(); 63 } 64 65 public boolean hasMore() 67 { 68 return iter.hasNext(); 69 } 70 71 public Object next() 72 { 73 return iter.next(); 74 } 75 76 public void close() 77 { 78 iter = null; 79 } 80 81 83 85 87 89 } | Popular Tags |