Sign in
apache
/
groovy
/
4ce380cda5b437999726dfd041cb1b0781e91ec9
/
.
/
groovy
/
modules
/
classic
/
src
/
test
/
groovy
/
script
/
MapFromList.groovy
blob: 610efdf0dbe0f36d8d7395651f8602aba1cfafe6 [
file
] [
log
] [
blame
]
class
MapFromList
{
talk
(
a
)
{
println
(
"hello "
+
a
)
}
doit
(
args
)
{
i
=
1
l
=
[:]
args
.
each
{
talk
(
it
)
l
.
put
(
it
,
i
++)
}
l
.
each
{
println
(
it
)
}
}
static
void
main
(
args
)
{
a
=
[
'tom'
,
'dick'
,
'harry'
]
t
=
new
MapFromList
()
t
.
doit
(
a
)
}
}