История страницы
...
Get the index of the last
...
Группа действий: Коллекции
Описание
Действие возвращает индекс последнего вхождения элемента в списке
Иконка
Параметры
Входные параметры
Список Список для обработки.
Значение Значение для проверки
Выходные параметры
Индекс Числовая переменная, содержащая индекс элемента с указанным значением или -1, если элемент не найден.
Настройки
occurrence Version 11 (Java)
Action group: Collections
...
Description
The action returns the index of the last occurrence.
Action icon
Parameters
Input parameters
Parameter | Description |
---|---|
List | The list for processing. |
Value | The value for checking. |
Output parameters
Index - a numeric variable containing the index of the element with the specified value, or -1 if the element is not found.
Settings of parameters
Property | Description | Type | Filling example | Mandatory |
Parameters | ||||
List | List for processing |
Свойство
Описание
Тип
Пример заполнения
Обязательность заполнения поля
Параметры
Список
. | Robin.Collection |
yes |
Значение
Value | Value for checking. | Robin.Object |
yes |
Results |
Индекс
Index | A numeric variable containing the index of the element with the specified value, or -1 if the element is not found. | Robin.Numeric |
Особые условия использования
Отсутствуют
Пример использования
Задача: существует переменная "Коллекция 1" с значениями городов. Требуется определить индекс последнего вхождения элемента "Москва" в списке.
Решение: воспользоваться действием "Получить индекс последнего вхождения "
Реализация:
...
Special conditions of use
None.
Example of use
Task
You have a "Collection 1" variable with the values of cities. Get the index of the last occurrence of the "Moscow" element.
Solution
Use the "Get the index of the last occurrence" action.
Implementation
- Move the "Get the index of the last occurrence" action to the workspace.
- Set the "Get the index of the last occurrence" action parameters.
- Start the robot by clicking "Start" in the top panel.
Result
The index of the last occurrence of the "Moscow" element was obtained.
...