Class IncludeRule


  • public class IncludeRule
    extends FileRule<CheckoutRules>
    Being used in checkout rules, contains source (from) part and to (destination) part
    • Method Detail

      • getTo

        public String getTo()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getMatchedHead

        @Nullable
        public String getMatchedHead​(@Nullable
                                     String path)
        Description copied from class: FileRule
        returns matched head path without trailing wildcards if matched with path, null otherwise
        Overrides:
        getMatchedHead in class FileRule<CheckoutRules>
        Parameters:
        path - file path to match with
        Returns:
        matched head path without trailing wildcards
      • createDefaultInstance

        public static IncludeRule createDefaultInstance()
      • toDescriptiveString

        public String toDescriptiveString()
      • map

        @Nullable
        public String map​(String path)
        Maps vcs relative file path to path described by checkout rules.
        Parameters:
        path - to map
        Returns:
        mapped path or null if path should be skipped.
      • createFullPath

        public String createFullPath​(String relativeFileName)
      • intersects

        public boolean intersects​(IncludeRule rule)
        Computes whether this rule intersects with specified rule. Rules intersect if their right part (getTo()) intersects, i.e if one is sub directory of another or both rules mapped to the same path.
        Parameters:
        rule - rule to check
        Returns:
        true if rules intersect
      • isAbsolutePathTo

        public boolean isAbsolutePathTo()