convert java 8 code snippet to java 7
lambda (->) is introduces in java 8. but java 7 does not support lambda.
I would like to convert the attached CommandHandler.java java 8 code to code that compiles in java 7. The following code snippet is an example of what is needed to convert:
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines
Order Paper NowABACPolicyLoader.policies.forEach((k,v)->{
System.out.println(” Permission :”+k);
int count[] = {0};
v.forEach((k1)->{
System.out.println(” policy “+(1+count[0]++));
k1.forEach((k3,v3)->{
System.out.println(” Attribute :”+k3+” Value :”+v3);
});
});
});
Please check the following urls to get an idea of how to do it:
https://stackoverflow.com/questions/14149984/for-e…
https://stackoverflow.com/questions/52720164/how-c…
I have attached the whole program. program includes Abacmonitor.java, ABACPolicyLoader.java, and CommandHandler.java.
The only thing that is needed to be converted in CommandHandler.java. A makefile is provided and it should compile properly once CommandHandler.java code is converted from java 8 and above to java 7.