@Override
	public Iterator<T> iterator() {
		return new Iterator<T>() {
			private int next = -1;

			@Override
			public boolean hasNext() {
				return (top != -1 && next != top);
			}

			@Override
			public T next() {
				if (isEmpty() || next == top) {
					throw new NoSuchElementException();
				}
				next++;
				return array[next];
			}

			@Override
			public void remove() {
				throw new UnsupportedOperationException();
			}
		};

	}