Difference between revisions of "Core.Terms.ListContainsValue"
Jump to navigation
Jump to search
(Add Core_Chk059) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Core]] | + | {{DISPLAYTITLE:OTX '''ListContainsValue'''}}[[Category:Core]] |
== Classification == | == Classification == | ||
− | {{ClassificationActivity | ListContainsValue | Checks whether a value in a list is found | [[Term]] | [[Core|OTX Core library]] | [[List realed terms]] | - | - }} | + | {{ClassificationActivity | ListContainsValue | Checks whether a value in a list is found | [[Term]] | [[Core|OTX Core library]] | [[List realed terms]] | - | [[Core.Validation.CoreChk059|Core_Chk059]] – type-safe ListContainsValue }} |
== OTL Syntax == | == OTL Syntax == | ||
Line 13: | Line 13: | ||
{{Important|Please keep in mind that this [[TermActivity]] in the form of an activity exists and no text can be entered. According to the respective [[ActionNode]] can further properties are added.}} | {{Important|Please keep in mind that this [[TermActivity]] in the form of an activity exists and no text can be entered. According to the respective [[ActionNode]] can further properties are added.}} | ||
− | {{TermReturnValue| [[Boolean]] | Return true if the value is found, otherwise false.}} | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Return true if the value is found, otherwise false.}} |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| ListTerm | [[List]] | [[Term]] | - | [1] | List, in which the term is searched}} | + | {{TableRowPropertie1| ListTerm | [[Core.DataTypes.ComplexDataType.ContainerDataType.List|List]] | [[Term]] | - | [1] | List, in which the term is searched}} |
{{TableRowPropertie2| Value | - | [[Term]] | - | [1] | Expression, which is locate in the list. Is the type corresponding to the type of the list elements.}} | {{TableRowPropertie2| Value | - | [[Term]] | - | [1] | Expression, which is locate in the list. Is the type corresponding to the type of the list elements.}} | ||
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | List<integer> list = {1,2,3} | + | List<integer> list = {1,2,3}; |
− | Boolean result = ListContainsValue(1) | + | Boolean result; |
+ | result = ListContainsValue(1); | ||
//Returns result = true | //Returns result = true | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[ListGetLength]] <br/> | + | [[Core.Terms.ListGetLength|ListGetLength]] <br/> |
− | [[ListCopy]] | + | [[Core.Terms.ListCopy|ListCopy]] |
Latest revision as of 05:01, 20 January 2022
Contents
Classification
Name | ListContainsValue |
Short Description | Checks whether a value in a list is found |
Class | Term |
Extension | OTX Core library |
Group | List realed terms |
Exceptions | - |
Checker Rules | Core_Chk059 – type-safe ListContainsValue |
Standard Compliant | Yes |
OTL Syntax
BooleanTerm = ListContainsValue(ListTerm, Term);
Description
ListContainsValue is a term, which returns true as a result, if the specified expression list is found, false otherwise.
![]() |
Important: Please keep in mind that this TermActivity in the form of an activity exists and no text can be entered. According to the respective ActionNode can further properties are added. |
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Boolean | Return true if the value is found, otherwise false. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
ListTerm | List | Term | - | [1] | List, in which the term is searched |
Value | - | Term | - | [1] | Expression, which is locate in the list. Is the type corresponding to the type of the list elements. |
OTL Examples
List<integer> list = {1,2,3};
Boolean result;
result = ListContainsValue(1);
//Returns result = true