Pipeline { @Internal public void replaceAll(List<PTransformOverride> overrides) { for (PTransformOverride override : overrides) { replace(override); } checkNoMoreMatches(overrides); } private  Pipeline(TransformHierarchy transforms, PipelineOptions options); protected  Pipeline(PipelineOptions options); static Pipeline create(); static Pipeline create(PipelineOptions options); PBegin begin(); OutputT apply(PTransform<? super PBegin, OutputT> root); OutputT apply(
      String name, PTransform<? super PBegin, OutputT> root); @Internal static Pipeline forTransformHierarchy(
      TransformHierarchy transforms, PipelineOptions options); @Internal PipelineOptions getOptions(); @Internal void replaceAll(List<PTransformOverride> overrides); PipelineResult run(); PipelineResult run(PipelineOptions options); CoderRegistry getCoderRegistry(); @Experimental(Kind.SCHEMAS) SchemaRegistry getSchemaRegistry(); @Deprecated void setCoderRegistry(CoderRegistry coderRegistry); @Internal void traverseTopologically(PipelineVisitor visitor); @Internal static OutputT applyTransform(
      InputT input, PTransform<? super InputT, OutputT> transform); @Internal static OutputT applyTransform(
      String name, InputT input, PTransform<? super InputT, OutputT> transform); @Override String toString();  }
@Test public void testReplaceAll() { pipeline.enableAbandonedNodeEnforcement(false); pipeline.apply("unbounded", GenerateSequence.from(0)); pipeline.apply("bounded", GenerateSequence.from(0).to(100)); pipeline.replaceAll( ImmutableList.of( PTransformOverride.of( application -> application.getTransform() instanceof GenerateSequence, new GenerateSequenceToCreateOverride()), PTransformOverride.of( application -> application.getTransform() instanceof Create.Values, new CreateValuesToEmptyFlattenOverride()))); pipeline.traverseTopologically( new PipelineVisitor.Defaults() { @Override public CompositeBehavior enterCompositeTransform(Node node) { if (!node.isRootNode()) { assertThat( node.getTransform().getClass(), not( anyOf( Matchers.equalTo(GenerateSequence.class), Matchers.equalTo(Create.Values.class)))); } return CompositeBehavior.ENTER_TRANSFORM; } }); }