我想在测试类里面测试collection里面的元素,但是get方法似乎只适用于ArrayList,/***@paramname*@paramdescription*@paramprice*/publicRecipe(Stringname,Stringdescription,doubleprice,Ingredient...ingredients){if(name==null||name.isEmpty()){thrownewIllegalArgumentException("namecan'tbenulloranemptystring");}this.name=name;if(description==null||description.isEmpty()){thrownewIllegalArgumentException("descriptioncan'tbenulloranemptystring");}this.description=description;if(price
添加回答
举报
0/150
提交
取消