View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.coding.finallocalvariable;
2   
3   import java.math.BigDecimal;
4   
5   
6   public class InputFinalLocalVariableNameLambda {
7       private interface Lambda {
8           public Object op(AugmentedOrder a, AugmentedOrder b);
9       }
10      private static class AugmentedOrder {
11          public BigDecimal reduce(final BigDecimal zero, final Lambda l) {
12              return null;
13          }
14          public Object add(final Object amount) {
15              return null;
16          }
17          public Object getAmount() {
18              return null;
19          }
20      }
21  
22      private void addTotalValueOfOrder(final AugmentedOrder order) {
23      final BigDecimal totalValueOfOrder = order
24              .reduce(BigDecimal.ZERO,
25                      (t, u) -> t.add(u.getAmount()));
26   }
27  }
28  interface Operation {
29      public Object apply();
30  
31      public static final Operation OPERATION = () -> {
32          Object result;
33          result = null;
34          return result;
35      };
36  }