Created
September 21, 2012 16:41
-
-
Save phearnot/3762546 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
implicit val bdStringView = StringView.of[BigDecimal] as { _.toString } | |
def makeStringValue[T](implicit sv: StringView) = new StringValue { | |
def getString(value: AnyRef) = sv(value.asInstanceOf[T]) | |
} | |
bdStringValue = makeStringValue[BigDecimal] | |
strStringValue = makeStringValue[String] | |
qtyStringValue = makeStringValue[Long](StringView.of[Long] as { _.toString } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment