Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Get the index of the last occurrence Version 11 (Java)

Группа действийAction group: КоллекцииCollections

Описание

Действие возвращает индекс последнего вхождения элемента в списке

Иконка

Image Removed

Параметры

Входные параметры

Список                    Список для обработки.

Значение                Значение для проверки

Выходные параметры

Индекс Числовая переменная, содержащая индекс элемента с указанным значением или -1, если элемент не найден.

Настройки

...

Description

The action returns the index of the last occurrence.

Action icon

Image Added

Parameters

Input parameters

ParameterDescription
ListThe list for processing. 
ValueThe 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

Property

Description

Type

Filling example

Mandatory

Parameters

List

List for processing

Свойство

Описание

Тип

Пример заполнения

Обязательность заполнения поля

Параметры

Список

Список для обработки

.

Robin.Collection

Да

yes

Значение

Значение для проверки

Value

Value for checking.

Robin.Object

Да

yes

Результаты
Results

Индекс

Числовая переменная, содержащая индекс элемента с указанным значением или -1, если элемент не найден

Index

A numeric variable containing the index of the element with the specified value, or -1 if the element is not found.

Robin.Numeric

Особые условия использования

Отутствуют 

Пример использования 

Задача



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 

  1. Перенести действие Move the "Get the index of the last occurrence" на рабочую областьaction to the workspace.


  2. Настроить параметры действия Set the "Get the index of the last occurrence" action parameters

  3. Запустить робота по кнопке "Запуск" в верхней панели. 

Результат


  1. Start the robot by clicking "Start" in the top panel.

Result

The index of the last occurrence of the "Moscow" element was obtained.Определен индекс последнего вхождения элемента "Москва" в списке.