NamedArraylist methods syntax: Difference between revisions
m (Automatically generated page update) |
m (Automatically generated page update) |
||
Line 10: | Line 10: | ||
<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">%number</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[CountSubset (GenericNamedArraylist function)|CountSubset]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">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">%number</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[CountSubset (GenericNamedArraylist function)|CountSubset]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">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">%nal</span><span class="literal">=</span> <span class="term">nal</span><span class="literal">:[[DeepCopy (NamedArraylist 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">%nal</span><span class="literal">=</span> <span class="term">nal</span><span class="literal">:[[DeepCopy (NamedArraylist 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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[Default (GenericNamedArraylist property)|Default]]</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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[Default (GenericNamedArraylist property)|Default]]</span> | ||
<span class="term">anyNal</span><span class="literal">:[[Default (GenericNamedArraylist property)|Default]]</span> <span class="literal">=</span><span class="term">%item</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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[FindNextItem (GenericNamedArraylist function)|FindNextItem]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">selectionCriterion</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[FindNextItem (GenericNamedArraylist function)|FindNextItem]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">selectionCriterion</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%number</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[FindNextItemNumber (GenericNamedArraylist function)|FindNextItemNumber]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">selectionCriterion</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%number</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[FindNextItemNumber (GenericNamedArraylist function)|FindNextItemNumber]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">selectionCriterion</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[FindPreviousItem (GenericNamedArraylist function)|FindPreviousItem]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">selectionCriterion</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[FindPreviousItem (GenericNamedArraylist function)|FindPreviousItem]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">selectionCriterion</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%number</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[FindPreviousItemNumber (GenericNamedArraylist function)|FindPreviousItemNumber]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">selectionCriterion</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%number</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[FindPreviousItemNumber (GenericNamedArraylist function)|FindPreviousItemNumber]]</span><span class="literal">(</span> <span class="term" title="SelectionCriterion">selectionCriterion</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%item</span><span class="literal">=</span> <span class="term">nal</span><span class="literal">:[[Item (NamedArraylist property)|Item]]</span><span class="literal">(</span> <span class="term" title="String">string</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">%item</span><span class="literal">=</span> <span class="term">nal</span><span class="literal">:[[Item (NamedArraylist property)|Item]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="literal">)</span> | ||
<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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[ItemByNumber (GenericNamedArraylist property)|ItemByNumber]]</span><span class="literal">(</span> <span class="term" title="Number">number</span><span class="literal">)</span></p> | <span class="term">nal</span><span class="literal">:[[Item (NamedArraylist property)|Item]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="literal">)</span> <span class="literal">=</span><span class="term">%item</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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[ItemByNumber (GenericNamedArraylist property)|ItemByNumber]]</span><span class="literal">(</span> <span class="term" title="Number">number</span><span class="literal">)</span> | |||
<span class="term">anyNal</span><span class="literal">:[[ItemByNumber (GenericNamedArraylist property)|ItemByNumber]]</span><span class="literal">(</span> <span class="term" title="Number">number</span><span class="literal">)</span> <span class="literal">=</span><span class="term">%item</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">%string</span><span class="literal">=</span> <span class="term">nal</span><span class="literal">:[[Maximum (NamedArraylist function)|Maximum]]</span><span class="literal">(</span> <span class="term" title="ItemFunction">itemFunction</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">%string</span><span class="literal">=</span> <span class="term">nal</span><span class="literal">:[[Maximum (NamedArraylist function)|Maximum]]</span><span class="literal">(</span> <span class="term" title="ItemFunction">itemFunction</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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[MaximumItem (GenericNamedArraylist function)|MaximumItem]]</span><span class="literal">(</span> <span class="term" title="ItemFunction">itemFunction</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">%item</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[MaximumItem (GenericNamedArraylist function)|MaximumItem]]</span><span class="literal">(</span> <span class="term" title="ItemFunction">itemFunction</span><span class="literal">)</span></p> | ||
Line 34: | Line 37: | ||
<span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">MaxItems=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Label=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">MaxItems=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Label=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="Number">NameWidth=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span></p> | <span class="squareb">[</span><span class="literal" title="Number">NameWidth=</span> <span class="term" title="Number">number</span><span class="squareb">]</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">%boolean</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[UseDefault (GenericNamedArraylist property)|UseDefault]]</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">%boolean</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[UseDefault (GenericNamedArraylist property)|UseDefault]]</span> | ||
<span class="term">anyNal</span><span class="literal">:[[UseDefault (GenericNamedArraylist property)|UseDefault]]</span> <span class="literal">=</span><span class="term">%boolean</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">%number</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[Variance (GenericNamedArraylist function)|Variance]]</span><span class="literal">(</span> <span class="term" title="ItemFunction">itemFunction</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">%number</span><span class="literal">=</span> <span class="term">anyNal</span><span class="literal">:[[Variance (GenericNamedArraylist function)|Variance]]</span><span class="literal">(</span> <span class="term" title="ItemFunction">itemFunction</span><span class="literal">)</span></p> |
Revision as of 17:46, 31 January 2011
The syntax for each of the NamedArraylist 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 NamedArraylist methods.
anyNal:Audit( itemFunction, [NumWidth= number], [Separator= string], - [Start= number], [MaxItems= number], [Label= string], - [NameWidth= number])
%number= anyNal:Average( itemFunction)
%nal= nal:Copy
%number= anyNal:Count
%number= anyNal:CountSubset( selectionCriterion)
%nal= nal:DeepCopy
%item= anyNal:Default anyNal:Default =%item
%item= anyNal:FindNextItem( selectionCriterion, [Start= number])
%number= anyNal:FindNextItemNumber( selectionCriterion, [Start= number])
%item= anyNal:FindPreviousItem( selectionCriterion, [Start= number])
%number= anyNal:FindPreviousItemNumber( selectionCriterion, [Start= number])
%item= nal:Item( string) nal:Item( string) =%item
%item= anyNal:ItemByNumber( number) anyNal:ItemByNumber( number) =%item
%string= nal:Maximum( itemFunction)
%item= anyNal:MaximumItem( itemFunction)
%string= nal:Minimum( itemFunction)
%item= anyNal:MinimumItem( itemFunction)
%string= nal:NameByNumber( number)
%number= nal:Number( string)
anyNal:Print( itemFunction, [NumWidth= number], [Separator= string], - [Start= number], [MaxItems= number], [Label= string], - [NameWidth= number])
[%number=] nal:RemoveItem( string)
%al= anyNal:SortNew( sortOrder)
%number= anyNal:StandardDeviation( itemFunction)
%nal= nal:SubsetNew( selectionCriterion)
%number= anyNal:Sum( itemFunction)
anyNal:Trace( itemFunction, [NumWidth= number], [Separator= string], - [Start= number], [MaxItems= number], [Label= string], - [NameWidth= number])
%boolean= anyNal:UseDefault anyNal:UseDefault =%boolean
%number= anyNal:Variance( itemFunction)