Class Files.PathTransformation

  • Enclosing class:
    Files

    protected static class Files.PathTransformation
    extends java.lang.Object
    a search regex and a replacement for path transformations
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.regex.Pattern matches
      pattern for a transformation
      protected java.lang.String replacement
      what the pattern should be replaced with
    • Constructor Summary

      Constructors 
      Constructor Description
      PathTransformation​(java.lang.String find, java.lang.String replace)
      create a new transformation with the pattern and replacement
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String transform​(java.lang.String path)
      change a path if it matches this transformation
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • matches

        protected java.util.regex.Pattern matches
        pattern for a transformation
      • replacement

        protected java.lang.String replacement
        what the pattern should be replaced with
    • Constructor Detail

      • PathTransformation

        public PathTransformation​(java.lang.String find,
                                  java.lang.String replace)
        create a new transformation with the pattern and replacement
    • Method Detail

      • transform

        public java.lang.String transform​(java.lang.String path)
        change a path if it matches this transformation