Created
October 27, 2016 16:58
-
-
Save mmollaverdi/9fb7b92e3ad20ee777718e1c07bf0f09 to your computer and use it in GitHub Desktop.
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
def getOwnerName(systemId: String): Option[String] = { | |
val systemOption: Option[System] = systemsMap.get(systemId) | |
val ownerOption: Option[Owner] = systemOption.flatMap(system => ownersMap.get(system.ownerId)) | |
ownerOption.map(owner => owner.name) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment