I changes the question so it will be more clear, please see the example below.
Can I create a dictionary in Java any sort of map list, where the value is a function?
if yes, how do I do it and how can I iterate it to call the functions ?
I want something like this:
dictionary values
{
0: { name1, func1)
1: {name2, func2)
.....
.....
}
for (values value: values.getValues())
{
///does something with
dictionary[value][0] //doing soething with the name
dictionary[value][1]() //calling the function
}