1 18 package org.objectweb.jorm.lib; 19 20 import org.objectweb.jorm.api.PNameIterator; 21 import org.objectweb.jorm.api.PException; 22 23 import java.util.Iterator ; 24 25 30 public class Iterator2PNameIterator implements PNameIterator { 31 32 35 private Iterator inner; 36 37 public Iterator2PNameIterator(Iterator inner) { 38 this.inner = inner; 39 } 40 41 public void close() throws PException { 42 inner = null; 43 } 44 45 public boolean hasNext() { 46 return inner != null && inner.hasNext(); 47 } 48 49 public Object next() { 50 return inner.next(); 51 } 52 53 public void remove() { 54 inner.remove(); 55 } 56 } 57 | Popular Tags |