Method of appconfig to get an array reference to the configuration list and push the user - provided data into that array 方法來(lái)得到對(duì)配置列表的數(shù)組引用,并將用戶給出的數(shù)據(jù)壓入到數(shù)組中。
The value , the index , and the array reference are popped from the stack ; the value is put into the array element at the given index 從堆棧中彈出值、索引和數(shù)組引用;將值放入給定索引處的數(shù)組元素中。
Every individual also will have a " words " array reference that will hold all the words the individual made during this generation 每一個(gè)個(gè)體還擁有一個(gè)“單詞”數(shù)組引用,在這個(gè)數(shù)組中保持有在衍生過(guò)程中那個(gè)個(gè)體生成的單詞。
Tied hash values have to be in an array reference , there will suddenly be a key " fido " with values " dog " and " friend " in an array in that same 綁定散列中將突然會(huì)出現(xiàn)一個(gè)帶有值“ dog ”和“ friend ”的鍵“ fido ” 。請(qǐng)參閱該文檔的示例:
Method of appconfig can be used to get the value of an individual parameter ; because the parameters of interest are always array references , i automatically de - reference them 方法可以用來(lái)得到各個(gè)參數(shù)的值;由于感興趣的參數(shù)總是數(shù)組引用,我自動(dòng)地對(duì)它們進(jìn)行解引用。
By simply copying the array reference instead of cloning it , both the message and the class that produces it hold a reference to the master copy of the previous bids array 通過(guò)簡(jiǎn)單地復(fù)制而不是克隆數(shù)組引用,消息和產(chǎn)生消息的類都保存了前一投標(biāo)數(shù)組的主副本的一個(gè)引用。
You can do it by accessing internal appconfig : : state data or the array reference returned to you as the value of the array variable , but it is not recommended that you do so 可以通過(guò)訪問(wèn)內(nèi)部的appconfig : : state數(shù)據(jù)或作為數(shù)組變量值返回給您的數(shù)組引用來(lái)實(shí)現(xiàn)這一步,但我們建議您不要這樣做。
Note that if array references or other mutable fields are being initialized from arguments passed to a constructor , you must defensively copy the caller - provided arguments or else you can t be sure that you have exclusive access to the array 注:如果從傳遞給構(gòu)造函數(shù)的參數(shù)中初始化數(shù)組引用或其它可變字段,您必須用防范措施將調(diào)用程序提供的參數(shù)或您無(wú)法確保具有獨(dú)占訪問(wèn)權(quán)的其它信息復(fù)制到數(shù)組。
This means that when a caller obtains an iterator , which internally holds a reference to the underlying array , the array referenced by the iterator is effectively immutable and therefore can be traversed without synchronization or risk of concurrent modification 這意味著當(dāng)調(diào)用程序獲得迭代器(迭代器在內(nèi)部保存對(duì)基本數(shù)組的引用)時(shí),迭代器引用的數(shù)組實(shí)際上是不變的,從而可以無(wú)需同步或冒并發(fā)修改的風(fēng)險(xiǎn)進(jìn)行遍歷。
There may be a cost to making defensive copies when passing an array reference to another class , but unless you are sure that the other class either makes its own copy or that it will not hold the reference for longer than the duration of the call , you probably want to make a copy before passing the array 當(dāng)傳遞一個(gè)數(shù)組引用到另一個(gè)類時(shí),可能有創(chuàng)建防御副本的代價(jià),除非您能確保其他類要么創(chuàng)建了它自己的副本,要么只在調(diào)用期間保存引用,否則您可能需要在傳遞數(shù)組之前創(chuàng)建副本。