Isn't this what constructors are for?