You don't define a member variable and then provide accessor and mutator methods.
定义数据成员后不需要分别定义访问和修改的方法。
The double-dot operator invokes mutator methods to set values for each of the address attributes.
双点运算符调用了mutator方法来设置每个地址属性的值。
Such sources are read-only; thus, you should make their mutator methods private to minimize runtime failures.
这类数据源是只读的,因此应该将其mutator方法设为私有,以减少运行时错误。
It then becomes easy to create setFoo property mutator methods that use the generated mutator methods under the hood.
然后,就可以方便地创建setfoo属性mutator方法,它在幕后使用生成的mutator方法。
To implement mutator methods, the new LinkedList class serves as a container for an internal, immutable list, as shown in Listing 5.
为了执行可变的方法,新的LinkedList类作为一个内部不可变的链表的容器,如清单5 所示。
The connection factory's constructor is parameterless, so the factory has mutator methods that can be invoked to control the properties of the connection the factory will supply.
连接工厂的构造器是无参数的,因此工厂有变异方法可以被调用,以控制工厂将提供的连接的特性。
To remedy the previously mentioned anti-pattern, you can "hide the exposed instance variables and provide publicly exposed mutator and accessor methods as appropriate to access the object state."
要补救前面提到的反模式,您可以“隐藏暴露的实例变量,并且提供公开暴露的增变方法和访问方法,适用于访问对象状态”。
When you create a structured type, DB2 automatically creates a constructor function for the type and creates both mutator and observer methods for the attributes of the type.
当您创建结构化类型时,DB 2为类型自动创建一个构造函数,并为类型的属性创建mutator方法和observer方法。
The second set of methods is the "mutator" methods, they create a new query() object with the relevant (internal)attribute either augmented or replaced.
第二组的方法是“突变”方法,他们创建一个新的查询()对象与相关(内部的)属性增强或取代。
The second set of methods is the "mutator" methods, they create a new query() object with the relevant (internal)attribute either augmented or replaced.
第二组的方法是“突变”方法,他们创建一个新的查询()对象与相关(内部的)属性增强或取代。
应用推荐