Created
December 19, 2010 18:20
-
-
Save jneira/747554 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
type Instrument = String | |
type Account = String | |
type Quantity = BigDecimal | |
type Money = BigDecimal | |
import java.util.{Calendar, Date} | |
val today = Calendar.getInstance.getTime | |
case class Trade(ref: String, ins: Instrument, account: Account, unitPrice: Money, | |
quantity: Quantity, tradeDate: Date = today) { | |
def principal = unitPrice * quantity | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment