1 16 package org.apache.commons.collections.iterators; 17 18 import org.apache.commons.collections.MapIterator; 19 20 30 public class AbstractMapIteratorDecorator implements MapIterator { 31 32 33 protected final MapIterator iterator; 34 35 42 public AbstractMapIteratorDecorator(MapIterator iterator) { 43 super(); 44 if (iterator == null) { 45 throw new IllegalArgumentException ("MapIterator must not be null"); 46 } 47 this.iterator = iterator; 48 } 49 50 55 protected MapIterator getMapIterator() { 56 return iterator; 57 } 58 59 public boolean hasNext() { 61 return iterator.hasNext(); 62 } 63 64 public Object next() { 65 return iterator.next(); 66 } 67 68 public void remove() { 69 iterator.remove(); 70 } 71 72 public Object getKey() { 73 return iterator.getKey(); 74 } 75 76 public Object getValue() { 77 return iterator.getValue(); 78 } 79 80 public Object setValue(Object obj) { 81 return iterator.setValue(obj); 82 } 83 84 } 85 | Popular Tags |