Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. public class Youyou {
  2. public static final Map<Integer, Map<String, Integer>> conditionEvaluationCount = new HashMap<>();
  3.  
  4. public void youyou() {
  5. String youyou = "Youyou, sortez couverts !";
  6. int x = 42;
  7.  
  8. if ((x < 42)) conditionEvaluationCount.get(6).put("(x < 42)", conditionEvaluationCount.get(6).get("(x < 42)") + 1);
  9. else if ((x == 42)) conditionEvaluationCount.get(6).put("(x == 42)", conditionEvaluationCount.get(6).get("(x == 42)") + 1);
  10. else if ((x > 42)) conditionEvaluationCount.get(6).put("(x > 42)", conditionEvaluationCount.get(6).get("(x > 42)") + 1);
  11. if (((x < 42) || (x == 42)) || (x > 42)) {
  12. System.out.println(youyou);
  13. }
  14. }
  15.  
  16. static {
  17. if (!conditionEvaluationCount.containsKey(6)) conditionEvaluationCount.put(6, new HashMap<>());
  18. }
  19. static {
  20. if (!conditionEvaluationCount.get(6).containsKey("(x < 42)")) conditionEvaluationCount.get(6).put("(x < 42)", 0);
  21. }
  22. static {
  23. if (!conditionEvaluationCount.get(6).containsKey("(x == 42)")) conditionEvaluationCount.get(6).put("(x == 42)", 0);
  24. }
  25. static {
  26. if (!conditionEvaluationCount.get(6).containsKey("(x > 42)")) conditionEvaluationCount.get(6).put("(x > 42)", 0);
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement