Created
August 22, 2012 16:09
-
-
Save yurique/3427085 to your computer and use it in GitHub Desktop.
scala version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person(var firstName: String, var lastName: String, var address: Address) { | |
def this() = this(null, null, null) | |
} | |
class Address(var city: String, var street: String) { | |
def this() = this(null, null) | |
} | |
val persons = getAListSomewhere(); | |
val filtered = persons.filter(_.address.city == "Kyiv") | |
val adresses = persons.map(_.address).toSet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment