package net.murakamin.sticker;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

import net.murakamin.sticker.commands.ExecutableCommand;

public class Commands implements List<ExecutableCommand>
{
	private final ArrayList<ExecutableCommand> childs;

	public Commands()
	{
		this.childs = new ArrayList<ExecutableCommand>();
	}

	public boolean add(final ExecutableCommand o)
	{
		return this.childs.add(o);
	}

	public void add(final int index, final ExecutableCommand element)
	{
		this.childs.add(index, element);
	}

	public boolean addAll(final Collection<? extends ExecutableCommand> c)
	{
		return this.childs.addAll(c);
	}

	public boolean addAll(final int index,
	        final Collection<? extends ExecutableCommand> c)
	{
		return this.childs.addAll(index, c);
	}

	public void clear()
	{
		this.childs.clear();
	}

	public boolean contains(final Object o)
	{
		return this.childs.contains(o);
	}

	public boolean containsAll(final Collection<?> c)
	{
		return this.childs.containsAll(c);
	}

	public ExecutableCommand get(final int index)
	{
		return this.childs.get(index);
	}

	public int indexOf(final Object o)
	{
		return this.childs.indexOf(o);
	}

	public boolean isEmpty()
	{
		return this.childs.isEmpty();
	}

	public Iterator<ExecutableCommand> iterator()
	{
		return this.childs.iterator();
	}

	public int lastIndexOf(final Object o)
	{
		return this.childs.lastIndexOf(o);
	}

	public ListIterator<ExecutableCommand> listIterator()
	{
		return this.childs.listIterator();
	}

	public ListIterator<ExecutableCommand> listIterator(final int index)
	{
		return this.childs.listIterator(index);
	}

	public ExecutableCommand remove(final int index)
	{
		return this.childs.remove(index);
	}

	public boolean remove(final Object o)
	{
		return this.childs.remove(o);
	}

	public boolean removeAll(final Collection<?> c)
	{
		return this.childs.removeAll(c);
	}

	public boolean retainAll(final Collection<?> c)
	{
		return this.childs.retainAll(c);
	}

	public ExecutableCommand set(final int index,
	        final ExecutableCommand element)
	{
		return this.childs.set(index, element);
	}

	public int size()
	{
		return this.childs.size();
	}

	public List<ExecutableCommand> subList(final int fromIndex,
	        final int toIndex)
	{
		return this.childs.subList(fromIndex, toIndex);
	}

	public Object[] toArray()
	{
		return this.childs.toArray();
	}

	public <T> T[] toArray(final T[] a)
	{
		return this.childs.toArray(a);
	}
}
