Interface AlignFilter

All Superinterfaces:
Filter, FolderFilter

public interface AlignFilter extends FolderFilter
A folder comparison filter that lets files and folders with different names be matched and compared, using a pair of regular or shell expressions. Created with Filters.addAlignFilter(String, String, boolean, boolean, String, String).

By default DeltaWalker aligns files and folders by name: a file named data.txt on one side is compared with the file named data.txt on the other side. Sometimes resources with different names need to be compared, for example data.txt with data.log. An align filter, also called an alignment override, does that by matching the two names with two expressions, a primary and a secondary one. The secondary expression can refer to groups of the primary expression.

  • Method Details

    • getApplyToFolders

      String getApplyToFolders()
      Returns the folders this filter applies to, as shell expressions separated by the platform path separator - ':' on macOS and Linux, ';' on Windows.
      Returns:
      the folders this filter applies to; an empty string when it applies to all folders
    • getCaseSensitive

      boolean getCaseSensitive()
      Answers whether the expressions of this filter match case-sensitively.
      Returns:
      true when matching is case sensitive, false when not.
    • isRegexType

      boolean isRegexType()
      Answers whether the patterns/expressions of this filter are regular or shell expressions.
      Specified by:
      isRegexType in interface Filter
      Returns:
      true for regular expressions, false for shell expressions
    • getSecondaryExpression

      String getSecondaryExpression()
      Returns the secondary expression of this align filter. The primary expression is returned by Filter.getExpression().
      Returns:
      the secondary expression