Created
October 19, 2011 10:58
-
-
Save j5ik2o/1297971 to your computer and use it in GitHub Desktop.
Scala - 補助コンストラクタ
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
package money | |
import java.util.Currency | |
import java.util.Locale | |
class Money(val amount : BigDecimal, val currency: Currency) { | |
// 補助コンストラクタ | |
def this(amount : BigDecimal) = this(amount, Currency.getInstance(Locale.getDefault)) | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment