Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
dbc5cfbd
Commit
dbc5cfbd
authored
Apr 27, 2016
by
Peter van 't Hof
Browse files
Added int lists and double list to config conversions
parent
dd9036c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala
View file @
dbc5cfbd
...
...
@@ -430,6 +430,18 @@ object ConfigUtils extends Logging {
else
Nil
}
/** Convert ConfigValue to List[Double] */
implicit
def
configValue2doubleList
(
value
:
ConfigValue
)
:
List
[
Double
]
=
{
if
(
requiredValue
(
value
))
any2list
(
value
.
value
).
map
(
any2double
(
_
))
else
Nil
}
/** Convert ConfigValue to List[Int] */
implicit
def
configValue2intList
(
value
:
ConfigValue
)
:
List
[
Int
]
=
{
if
(
requiredValue
(
value
))
any2list
(
value
.
value
).
map
(
any2int
(
_
))
else
Nil
}
/** Convert ConfigValue to Set[String] */
implicit
def
configValue2stringSet
(
value
:
ConfigValue
)
:
Set
[
String
]
=
{
if
(
requiredValue
(
value
))
any2stringSet
(
value
.
value
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment