Class IncludeRule


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

      • IncludeRule

        public IncludeRule​(@NotNull
                           java.lang.String from,
                           @NotNull
                           java.lang.String to,
                           CheckoutRules parentRules)
    • Method Detail

      • getTo

        public java.lang.String getTo()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        @Nullable
        public java.lang.String getMatchedHead​(@Nullable
                                               java.lang.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 java.lang.String toDescriptiveString()
      • map

        @Nullable
        public java.lang.String map​(java.lang.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 java.lang.String createFullPath​(java.lang.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()