我如何获得使用合成的机器总数?我在想这样的事......但我收到错误The operator + is undefined for the argument type(s) int, AssemblyLine
private List<AssemblyLine> machines = new ArrayList<AssemblyLine>();
public int getMachine(){
int total= 0;
for (AssemblyLine machine : machines) {
total = total + machine;
}
return total;
}