Extended to take varargs in the constructor.