I\'m coding against an API that gives me access to remote file system. The API returns a list of files and directories as list of node objects (parent to file and directory)
How about this:
val listOfBaseObjects: List[Any] = List[Any]("a string", 1:Integer); for (x <- listOfBaseObjects if x.isInstanceOf[String]) { println(x) }