工厂函数也是Change Value to Reference (将值对象改为引用对象)的基础。你也可以令你的工厂函数根据参数的个数和类型,选择不同的构建行为。
基于639个网页-相关网页
Change Value to Reference(将实值对象改为引用对象) Change Reference to Value(将引用对象改为实值对象) .
基于2个网页-相关网页
Change Reference to Value 将引用对象改为值对象 ; 将引用对象改为实值对象
Change e Value to Reference 将值对象改为引用对象
Change e Reference to Value 将引用对象改为值对象
The convert function takes the variable containing the input string, as well as a reference to the Label widget as parameters, so that it can change the value shown by the Label.
convert以包含有输入字符串的变量以及对Label窗口小部件的引用作为参数,以改变Label所显示的值。
If you want to change an immutable object, you don't - you create a new object with the changed value and point your reference to it.
如果您想要改变一个不可变对象的话,您不会改变它,而是使用修改后的值来创建一个新的对象,并把您的引用指向它。
However, you must be aware that these alternatives change the semantics of the interaction from pass-by-value to pass-by-reference.
然而,您必须注意到这些可供选择的方案会将交互方法从按值传递(pass - by - value)改变为按引用传递(pass - by - reference)。
应用推荐