Replace Java collections by Scala collections