Code example for ArrayDeque

Methods: iterator

0
		} 
		return min(right.getLeft()); 
	} 
 
	public Iterator<K> iterator() {
		Queue<K> keys = new ArrayDeque<K>();
		inorder(keys,root);
		return keys.iterator();
	} 
 
	private void inorder(Queue<K> keys, Node<K, V> node) {
		if (node == null) { 
			return; 
		} 
		inorder(keys, node.getLeft());
		keys.add(node.getKey());
		inorder(keys, node.getRight());
	} 
	 
	@SuppressWarnings("unused")