DeepCopy (Arraylist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "<span style="font-size:120%; color:black"><b><section begin=dpl_desc/>Deep Copy the Arraylist<section end=dpl_desc/></b></span> DeepCopy function <...")
 
m (add note re exception to deep copyability)
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b><section begin=dpl_desc/>Deep Copy the Arraylist<section end=dpl_desc/></b></span>
{{Template:Arraylist:DeepCopy subtitle}}
[[Category:Arraylist methods|DeepCopy function]]
<var>DeepCopy</var> makes a "deep copy" of the <var>Arraylist</var> method object, <var class="term">al</var>. If <var class="term">al</var> contains objects, they <b><i>are</i></b> copied.  If <var class="term">al</var> is <var>Null</var>, a <var>Null</var> is returned.
<!--DPL?? Category:Arraylist methods|DeepCopy function: Deep Copy the Arraylist-->
<p>
DeepCopy is a member of the [[Arraylist class]].
</p>


This function
==Syntax==
makes a &ldquo;deep copy&rdquo; of the Arraylist method object, ''%arrayl''.
{{Template:Arraylist:DeepCopy syntax}}
If ''%arrayl'' contains objects, they '''are''' copied.
If ''%arrayl'' is Null, a Null is returned.


For more information about copyability, see [[Copying objects]].
===Syntax terms===
===Syntax===
<table class="syntaxTable">
  %dcop = %arrayl:DeepCopy
<tr><th>%copyList</th>
====Syntax Terms====
<td>An <var>Arraylist</var> to contain the deep copy of the method object, <var class="term">al</var>. </td></tr>
<dl>
<dt><i>%dcop</i>
<dd>An Arraylist to contain the deep copy of ''%arrayl''.
<dt><i>%arrayl</i>
<dd>An Arraylist object.


</dl>
<tr><th>al</th>
<td>An <var>Arraylist</var> object, which may be <var>Null</var>.</td></tr>
</table>
 
==Usage notes==
<ul>
<li>Although <var>Arraylist</var> objects in general are deep copyable, a particular <var>Arraylist</var> might contain references to non-deep-copyable objects, which disallows deep copy of that specific <var>Arraylist</var>. </li>
</ul>
 
==See also==
<ul>
<li>Contrast with <var>[[Copy_(Arraylist_function)|Copy]]</var> which <b><i>does not</i></b> copy any nested objects.
<li>For more information about copyability, see [[Copying objects|"Copying objects"]].
</ul>
{{Template:Arraylist:DeepCopy footer}}

Latest revision as of 22:04, 23 January 2017

Deep Copy the Arraylist (Arraylist class)

DeepCopy makes a "deep copy" of the Arraylist method object, al. If al contains objects, they are copied. If al is Null, a Null is returned.

Syntax

%copyList = al:DeepCopy

Syntax terms

%copyList An Arraylist to contain the deep copy of the method object, al.
al An Arraylist object, which may be Null.

Usage notes

  • Although Arraylist objects in general are deep copyable, a particular Arraylist might contain references to non-deep-copyable objects, which disallows deep copy of that specific Arraylist.

See also

  • Contrast with Copy which does not copy any nested objects.
  • For more information about copyability, see "Copying objects".