0

My intention is to use filter method in an expression within the for loop. Now, the code looks like this:

«FOR interf : delegates.getInterf(delegate)»
          «IF !bridgeInterfaces.contains(interf)»
              ...
          «ENDIF»
«ENDFOR»

So, the aim is to have something as:

«FOR interf : delegates.getInterf(delegate).filter[!bridgeInterfaces.contains]»

The above, however, is incorrect. How could I achieve what I want?

1 Answers1

0

Please try «FOR interf : delegates.getInterf(delegate).filter[!bridgeInterfaces.contains(it)]». it is the name of the lambda parameter if you don't put an explicit name, e.g that would be equivalent to filter[it | !bridgeInterfaces.contains(it)]

Sebastian Zarnekow
  • 6,609
  • 20
  • 23