Arraylist methods syntax: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Automatically generated page update)
 
m (Automatically generated page update)
Line 7: Line 7:
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%average</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[Average (Arraylist function)|Average]]</span><span class="literal">(</span> <span class="term">method</span><span class="literal">)</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%average</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[Average (Arraylist function)|Average]]</span><span class="literal">(</span> <span class="term">method</span><span class="literal">)</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%copyList</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[Copy (Arraylist function)|Copy]]</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%copyList</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[Copy (Arraylist function)|Copy]]</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%count</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[Count (Arraylist function)|Count]]</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%count</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[Count (Arraylist property)|Count]]</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%count</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[CountSubset (Arraylist function)|CountSubset]]</span><span class="literal">(</span> <span class="term">selectionCriterion</span><span class="literal">)</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%count</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[CountSubset (Arraylist function)|CountSubset]]</span><span class="literal">(</span> <span class="term">selectionCriterion</span><span class="literal">)</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%copyList</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[DeepCopy (Arraylist function)|DeepCopy]]</span></p>
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%copyList</span><span class="literal">=</span> <span class="term">al</span><span class="literal">:[[DeepCopy (Arraylist function)|DeepCopy]]</span></p>

Revision as of 23:24, 19 January 2011

The syntax for each of the Arraylist class methods is shown below.

Square brackets indicate optional elements of the method invocation. See also the notation conventions for methods and the List of Arraylist methods.

[%count=] al:Add( collectionItem)

al:Audit( method, [NumWidth= numWidth], [Separator= separator], - [Start= start], [MaxItems= maxItems], [Label= label])

%average= al:Average( method)

%copyList= al:Copy

%count= al:Count

%count= al:CountSubset( selectionCriterion)

%copyList= al:DeepCopy

[%item=] al:Dequeue

[%count=] al:Enqueue( collectionItem)

%item= al:FindNextItem( selectionCriterion, [Start= start])

%number= al:FindNextItemNumber( selectionCriterion, [Start= start])

%item= al:FindPreviousItem( selectionCriterion, [Start= start])

%number= al:FindPreviousItemNumber( selectionCriterion, [Start= start])

%item= al:FirstItem

[%count=] al:Insert( number, collectionItem)

%item= al:Item( number)

%item= al:LastItem

%newList= %(Arraylist):List( list)

%number= al:Maximum( method)

%item= al:MaximumItem( method)

%number= al:Minimum( method)

%item= al:MinimumItem( method)

[%item=] al:Pop

al:Print( method, [NumWidth= numWidth], [Separator= separator], - [Start= start], [MaxItems= maxItems], [Label= label])

[%count=] al:Push( collectionItem)

[%count=] al:RemoveItem( number)

al:Sort( sortOrder)

%newList= al:SortNew( sortOrder)

%standardDev= al:StandardDeviation( method)

%newList= al:SubsetNew( selectionCriterion)

%sum= al:Sum( method)

al:Trace( method, [NumWidth= numWidth], [Separator= separator], - [Start= start], [MaxItems= maxItems], [Label= label])

%variance= al:Variance( method)