Second, given that this task class is a Runnable, the result of the array access needs to be assigned to the state field (and state needs to be used in an overriding toString method) to prevent DCE.
第二,既然这个任务类是Runnable,为了防止DCE,必须把数组访问的结果赋值给state字段(以及覆盖的toString方法中需要使用的state)。
To make this method a little easier, I wrap the access to the variable in a second function that takes a configuration key name and a default value, as shown below.
为使这个方法更加简单,将对变量的访问封装在第二个函数中,该函数使用配置键名及一个缺省值作为参数,如下所示。
The second method operates in the same fashion but employs two additional parameters to specify the record store's access restrictions.
第二个方法与第一个类似,只不过使用另外两个附加参数来指定记录存储的访问限制。
应用推荐