Created
May 14, 2017 05:47
-
-
Save dgadiraju/92d4e77c88a51b05c29302cb29ce333f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val os = Map( | |
(1, Order(1, "2017-01-01", 100, "COMPLETE")), | |
(2, Order(2, "2017-01-01", 20, "CLOSED")), | |
(3, Order(3, "2017-01-01", 301, "PENDING")), | |
(4, Order(4, "2017-01-01", 202, "CLOSED")), | |
(5, Order(5, "2017-01-01", 3013, "COMPLETE")) | |
) | |
m(1) | |
m.get(1).get | |
m.getOrElse(1, "Not Available") | |
m.getOrElse(10, "Not Available") | |
m.keys | |
m.values | |
m.filterKeys(a => a >= 2) | |
m.mapValues(a => (a.orderStatus, 1)).map(_._2).toList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment