diff options
author | Olli Virtanen <olli.virtanen@oath.com> | 2018-05-31 10:58:25 +0200 |
---|---|---|
committer | Olli Virtanen <olli.virtanen@oath.com> | 2018-05-31 10:58:25 +0200 |
commit | 3eefb81679eb3b3da6b782583b060166b39befd7 (patch) | |
tree | 77ec82f306f8d5bf6289e460b2adf621e0ad2f16 /standalone-container/src/main/scala/com/yahoo/container/standalone/Converter.scala | |
parent | 41fafa8edf8c7dda56b30050d5233b17f03babe1 (diff) |
Scala code in standalone-container converted to Java
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) - - -} |