Changing from reference to ArrayList to reference to List in Java