Class MultiPathMapping

  • All Implemented Interfaces:
    PathMapping

    public class MultiPathMapping
    extends java.lang.Object
    implements PathMapping
    Implements a path mapping that supports multiple symlinks
    Since:
    3.1.10
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MultiPathMapping link​(@NotNull java.lang.String src, @NotNull java.lang.String dst)
      Creates a new link from the path src to the path dst
      @NotNull java.lang.String map​(@NotNull java.lang.String path)
      Maps the given path to a new location.
      @NotNull java.lang.String map​(@NotNull java.lang.String path, boolean reverse)
      Maps the given path to a new location.
      @NotNull MultiPathMapping merge​(@Nullable MultiPathMapping base)
      Merges the links from the given base mapping
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiPathMapping

        public MultiPathMapping()
    • Method Detail

      • link

        public MultiPathMapping link​(@NotNull
                                     @NotNull java.lang.String src,
                                     @NotNull
                                     @NotNull java.lang.String dst)
        Creates a new link from the path src to the path dst
        Parameters:
        src - source path
        dst - destination path
        Returns:
        this
      • merge

        @NotNull
        public @NotNull MultiPathMapping merge​(@Nullable
                                               @Nullable MultiPathMapping base)
        Merges the links from the given base mapping
        Parameters:
        base - base mapping
        Returns:
        this
      • map

        @NotNull
        public @NotNull java.lang.String map​(@NotNull
                                             @NotNull java.lang.String path)
        Maps the given path to a new location.
        Specified by:
        map in interface PathMapping
        Parameters:
        path - the path
        Returns:
        the mapped path.
      • map

        @NotNull
        public @NotNull java.lang.String map​(@NotNull
                                             @NotNull java.lang.String path,
                                             boolean reverse)
        Maps the given path to a new location.
        Specified by:
        map in interface PathMapping
        Parameters:
        path - the path
        reverse - if true a reverse mapping is applied
        Returns:
        the mapped path.