Last active
December 10, 2015 14:48
-
-
Save prystupa/4449536 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
trait OrderType { | |
def bookDisplay: String | |
def price: PriceLevel | |
} | |
object OrderType { | |
def all(): PartialFunction[Order, OrderType] = { | |
case LimitOrder(_, _, _, limit) => new OrderType { | |
def bookDisplay: String = limit.toString | |
def price: PriceLevel = LimitPrice(limit) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment