Class PipeStepPair.Builder

  • Enclosing class:
    PipeStepPair

    public static class PipeStepPair.Builder
    extends java.lang.Object
    • Method Detail

      • openClose

        public PipeStepPair.Builder openClose​(java.lang.String open,
                                              java.lang.String close)
        Defines the opening and closing markers.
      • regex

        public PipeStepPair.Builder regex​(java.lang.String regex)
        Defines the pipe via regex. Must have *exactly one* capturing group.
      • regex

        public PipeStepPair.Builder regex​(java.util.regex.Pattern regex)
        Defines the pipe via regex. Must have *exactly one* capturing group.
      • buildPair

        public PipeStepPair buildPair()
        Returns a pair of steps which captures in the first part, then returns in the second.
      • buildStepWhichAppliesSubSteps

        public FormatterStep buildStepWhichAppliesSubSteps​(java.nio.file.Path rootPath,
                                                           java.util.Collection<? extends FormatterStep> steps)
        Returns a single step which will apply the given steps only within the blocks selected by the regex / openClose pair.