コード例 #1
0
 @Override
 public KO getKey() {
   if (cachedTransformedKey == null) {
     try {
       cachedTransformedKey = keyTransformer.apply(input.getKey());
     } catch (Exception e) {
       throw new TransformationException(e, input.getKey(), input.getValue());
     }
   }
   return cachedTransformedKey;
 }
コード例 #2
0
 @Override
 public VO getValue() {
   if (cachedTransformedValue == null) {
     try {
       cachedTransformedValue = valueTransformer.transform(input.getKey(), input.getValue());
     } catch (Exception e) {
       throw new TransformationException(e, input.getKey(), input.getValue());
     }
   }
   return cachedTransformedValue;
 }