package com.eactive.eai.transformer.layout;

import java.util.Iterator;


public class ItemFullIterator extends ItemIterator {
	public ItemFullIterator(Iterator iterator) {
		super(iterator);
	}

	@Override
	public Object next() {	
		if (hasNext()) {
			Iterator iter = (Iterator) stack.peek();
			Item item = (Item) iter.next();
			if (item instanceof Composite) {
				stack.push(item.iterator()); 
			}
			return item;
		} else {
			return null;
		}
	}
}
