diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-06-01 11:31:13 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-06-01 11:31:13 +0200 |
commit | cd6e2dd7ab638487c462c40293a0d8db43fdb530 (patch) | |
tree | edf9cec58f4a0e995fd713089779ec5d0a14d134 /standalone-container/src/main/scala/com/yahoo/container/standalone/Converter.scala | |
parent | f7d0fe5fdfad579e867f01acc1d41b2ec77bd785 (diff) | |
parent | 5c57852b26126d72b080fb6e0893dc3d633c28c1 (diff) |
Merge with master
Diffstat (limited to 'standalone-container/src/main/scala/com/yahoo/container/standalone/Converter.scala')
-rw-r--r-- | standalone-container/src/main/scala/com/yahoo/container/standalone/Converter.scala | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/standalone-container/src/main/scala/com/yahoo/container/standalone/Converter.scala b/standalone-container/src/main/scala/com/yahoo/container/standalone/Converter.scala deleted file mode 100644 index 61128347319..00000000000 --- a/standalone-container/src/main/scala/com/yahoo/container/standalone/Converter.scala +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.container.standalone - -/** - * @author tonytv - */ -trait Converter[T] { - def convert(s: String): T -} - -object Converter { - def toConverter[T](f: String => T) = new Converter[T] { - override def convert(s: String) = f(s) - } - - implicit val intConverter = toConverter(_.toInt) - implicit val longConverter = toConverter(_.toLong) - implicit val boolConverter = toConverter(_.toBoolean) - implicit val stringConverter = toConverter(identity) - - implicit val javaIntegerConverter:Converter[Integer] = toConverter(_.toInt) - implicit val javaLongConverter:Converter[java.lang.Long] = toConverter(_.toLong) - implicit val javaBooleanConverter:Converter[java.lang.Boolean] = toConverter(_.toBoolean) - - -} |