Commit 66bebf8a authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added implicit Option[File] and Option[String]

parent 66224274
......@@ -340,6 +340,15 @@ object ConfigUtils extends Logging {
if (value != null && value.value != null && value.value != None) new File(any2string(value.value)) else null
}
/**
* Convert ConfigValue to File
* @param value Input ConfigValue
* @return
*/
implicit def configValue2optionFile(value: ConfigValue): Option[File] = {
if (value != null && value.value != null && value.value != None) Some(new File(any2string(value.value))) else None
}
/**
* Convert ConfigValue to String
* @param value Input ConfigValue
......@@ -350,6 +359,15 @@ object ConfigUtils extends Logging {
if (value != null && value.value != null && value.value != None) any2string(value.value) else null
}
/**
* Convert ConfigValue to String
* @param value Input ConfigValue
* @return
*/
implicit def configValue2optionString(value: ConfigValue): Option[String] = {
if (value != null && value.value != null && value.value != None) Some(any2string(value.value)) else None
}
/**
* Convert ConfigValue to Long
* @param value Input ConfigValue
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment