https://stackoverflow.com/questions/25290481/groovy-remove-duplicate-from-list-using-unique-function
Groovy remove duplicate from list using unique function
I'm using soapui groovy script. I want to remove the duplicate from a list, using the next code: def myStr = "aaaa ; bbbb ; ccccc" def myList = myStr.split(";") myList = myList.unique() but wh...
stackoverflow.com
https://stackoverflow.com/questions/17465787/how-to-remove-duplicate-values-from-a-list-in-groovy
How to remove Duplicate Values from a list in groovy
I have a collection of ID list to be saved into the database if(!session.ids) session.ids = [] session.ids.add(params.id) and I found out that list has duplicates, like [1, 2, 4, 9, 7, 10, ...
stackoverflow.com
def ids = [1,2,3,4,5,5]
ids = ids.unique()
'Develop > Groovy' 카테고리의 다른 글
Groovy Docs (0) | 2022.09.29 |
---|---|
Pipeline Syntax (0) | 2022.09.27 |
Truncate String (0) | 2022.09.27 |
댓글