Remove duplicates Version 1 (Java)

Action group: Collections


Description

The action removes items with duplicate values from the collection. Duplicates will be checked only in elements with type "Boolean", "String", "Numeric", "Data-time", "Point coordinates", "Folder path", "File path".

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
CollectionThe collection from which to remove elements with duplicate values. All changes will be saved to the same collection.Robin.Collection
Yes
Consider the caseIf the value is «true», the value comparison will be case-sensitive. If «false», it will not be case sensitive.Robin.BooleantrueNo

Special conditions of use

The original collection is checked for elements with repeating values and returns the same collection but without these elements.

Example of use

Task

There is a collection of 3 records with a doublet:

It is necessary to delete the double. Then, get the collection values by indices "0" and "1". 

Solution

Use the "Remove duplicates", "Get length", "Get value by index" actions. 

Implementation

  1. Assemble a robot scheme consisting of actions:


  2. Set the parameters of the "Remove duplicates" action.


  3. Set the "Get length" action parameter.


  4. Set the parameters of the "Get value by index 1" action. 


  5. Set the parameters of the "Get value by index 2" action. 

  6. Click on the "Start" button in the top panel. 

Result

The program robot completed successfully. There are 2 records left in the collection (Harry and Charlie).