1 17 package org.apache.commons.collections.primitives.adapters; 18 19 import java.util.Iterator ; 20 21 import org.apache.commons.collections.primitives.BooleanIterator; 22 23 34 public class BooleanIteratorIterator implements Iterator { 35 36 49 public static Iterator wrap(BooleanIterator iterator) { 50 return null == iterator ? null : new BooleanIteratorIterator(iterator); 51 } 52 53 59 public BooleanIteratorIterator(BooleanIterator iterator) { 60 _iterator = iterator; 61 } 62 63 public boolean hasNext() { 64 return _iterator.hasNext(); 65 } 66 67 public Object next() { 68 return new Boolean (_iterator.next()); 69 } 70 71 public void remove() { 72 _iterator.remove(); 73 } 74 75 private BooleanIterator _iterator = null; 76 77 } 78 | Popular Tags |