package cz.muni.fi.bronchus.questions; import java.util.Collection; import java.util.Vector; /** * Repository is container for storing object. * @author Tomáš Udržal */ public class Repository { /** * Vector for storing items */ private Vector data; /** Creates a new instance of Repository */ public Repository() { data = new Vector(); } /** * Appends the specified element to the end of the Vector * @param o element to be added */ public void addItem(Object o) { data.add(o); } /** * Returns the Vector of the elements of this Repository * @return Vector of the items */ public Vector getData() { return data; } /** * Removes all of the elements from the Vector */ public void clearItems() { data.clear(); } /** * Appends the elements of the specified Collection to the end of the Vector, * in the order that they are returned by the Collection's Iterator * @param c elements to be added */ public void addAll(Collection c) { data.addAll(c); } }