Not asking if the contains is working, but rather how it works? What I am saying is that if this list is implemented in such a way that there is a variable which contains the actual size of valid objects, AND this variable is incremented/decremented when an object is added/removed, AND the contains method uses this size variable to loop through the array to check for the object, if you add objects without incrementing this contains method will not know the actual length. Is there a method to add a single object, and does this pass the tests? Try using this to add the individual object as you loop through
public boolean addGroup(Vector<Object> objects, int start)
{
for(int i = 0; i < objects.size(); i++)
{
Object x = objects.get(i);
add(x);
}
return true;
}