Difference between revisions of "Extensions.Util.ListIndexOfAny"

From emotive
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
ListTerm = Util.ListIndexOfAny(ListTerm, Term);
+
ListTerm Util.ListIndexOfAny(ListTerm list, Term value);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 24: Line 24:
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
/// Local Declarations
 +
 
List<Integer> List1;
 
List<Integer> List1;
  

Latest revision as of 05:04, 8 November 2018

Classification

Name ListIndexOfAny
Short Description Gets a List of indexes of a given value in the List
Class Term
Extension OTX Util extension
Group Util related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

ListTerm Util.ListIndexOfAny(ListTerm list, Term value);

Description

This term shall return a list of Integer(represents Integer[]).

The OTX ListIndexOfAny term is an otx:ListTerm that returns a List of indexes of a given value in the List. In case the value is not contained inside the list, an empty list will be returned.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
List The List of indexes of a given value in the List. In case the value is not contained inside the list, an empty list will be returned.

Properties

Name Data Type Class Default Cardinality Description
List List Term - [1..1] The List which shall be checked for the value.
Value - Term - [1..1] The value whose index in the List shall be determined.

OTL Examples

/// Local Declarations

List<Integer> List1;

/// Flow

List1 = Util.ListIndexOfAny({&AA, &AB, &AC, &AB, &AF, &AE, &AB}, &AB);

See also

Compare
CopyByteField
GetRandomNumber
IsInitialized
ListIndexOf
ListReverse
ListSort
Max
Min
StringFormat