Convert java 8 code snippet to java 7
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:
ABACPolicyLoader.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.
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


