@Test public void testOrElseChainSingleton() { SimpleTransformation t1 = new SimpleTransformation(TrueExpr.INSTANCE, Noop.NOOP_DEST_NAT); assertThat( orElseChain(ImmutableList.of(t1)), equalTo(Transformation.when(TrueExpr.INSTANCE).apply(Noop.NOOP_DEST_NAT).build())); }
public static @Nullable Transformation orElseChain( Iterable<SimpleTransformation> simpleTransformations) { Transformation current = null; for (SimpleTransformation earlier : simpleTransformations) { current = Transformation.when(earlier.getGuard()) .apply(earlier.getStep()) .setOrElse(current) .build(); } return current; }
F5NatUtil { public static @Nullable Transformation orElseChain( Iterable<SimpleTransformation> simpleTransformations) { Transformation current = null; for (SimpleTransformation earlier : simpleTransformations) { current = Transformation.when(earlier.getGuard()) .apply(earlier.getStep()) .setOrElse(current) .build(); } return current; } }
F5NatUtil { public static @Nullable Transformation orElseChain( Iterable<SimpleTransformation> simpleTransformations) { Transformation current = null; for (SimpleTransformation earlier : simpleTransformations) { current = Transformation.when(earlier.getGuard()) .apply(earlier.getStep()) .setOrElse(current) .build(); } return current; } private  F5NatUtil(); }
F5NatUtil { public static @Nullable Transformation orElseChain( Iterable<SimpleTransformation> simpleTransformations) { Transformation current = null; for (SimpleTransformation earlier : simpleTransformations) { current = Transformation.when(earlier.getGuard()) .apply(earlier.getStep()) .setOrElse(current) .build(); } return current; } private  F5NatUtil(); static @Nullable Transformation orElseChain(
      Iterable<SimpleTransformation> simpleTransformations); }
F5NatUtil { public static @Nullable Transformation orElseChain( Iterable<SimpleTransformation> simpleTransformations) { Transformation current = null; for (SimpleTransformation earlier : simpleTransformations) { current = Transformation.when(earlier.getGuard()) .apply(earlier.getStep()) .setOrElse(current) .build(); } return current; } private  F5NatUtil(); static @Nullable Transformation orElseChain(
      Iterable<SimpleTransformation> simpleTransformations);  }