Enum Depth

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Depth>

    public enum Depth
    extends java.lang.Enum<Depth>
    The concept of depth for directories. Note: This is similar to, but not exactly the same as, the WebDAV and LDAP concepts of depth.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      empty
      Just the named directory D, no entries.
      exclude
      Exclude (i.e, don't descend into) directory D.
      files
      D + its file children, but not subdirs.
      immediates
      D + immediate children (D and its entries).
      infinity
      D + all descendants (full recursion from D).
      unknown
      Depth undetermined or ignored.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Depth()  
    • Enum Constant Detail

      • unknown

        public static final Depth unknown
        Depth undetermined or ignored.
      • exclude

        public static final Depth exclude
        Exclude (i.e, don't descend into) directory D.
      • empty

        public static final Depth empty
        Just the named directory D, no entries. Updates will not pull in any files or subdirectories not already present.
      • files

        public static final Depth files
        D + its file children, but not subdirs. Updates will pull in any files not already present, but not subdirectories.
      • immediates

        public static final Depth immediates
        D + immediate children (D and its entries). Updates will pull in any files or subdirectories not already present; those subdirectories' this_dir entries will have depth-empty.
      • infinity

        public static final Depth infinity
        D + all descendants (full recursion from D). Updates will pull in any files or subdirectories not already present; those subdirectories' this_dir entries will have depth-infinity. Equivalent to the pre-1.5 default update behavior.
    • Constructor Detail

      • Depth

        private Depth()
    • Method Detail

      • values

        public static Depth[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Depth c : Depth.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Depth valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • infinityOrEmpty

        public static final Depth infinityOrEmpty​(boolean recurse)
        Returns:
        A depth value of infinity when recurse is true, or empty otherwise.
      • infinityOrFiles

        public static final Depth infinityOrFiles​(boolean recurse)
        Returns:
        A depth value of infinity when recurse is true, or files otherwise.
      • infinityOrImmediates

        public static final Depth infinityOrImmediates​(boolean recurse)
        Returns:
        A depth value of infinity when recurse is true, or immediates otherwise.
      • unknownOrEmpty

        public static final Depth unknownOrEmpty​(boolean recurse)
        Returns:
        A depth value of unknown when recurse is true, or empty otherwise.
      • unknownOrFiles

        public static final Depth unknownOrFiles​(boolean recurse)
        Returns:
        A depth value of unknown when recurse is true, or files otherwise.
      • unknownOrImmediates

        public static final Depth unknownOrImmediates​(boolean recurse)
        Returns:
        A depth value of unknown when recurse is true, or immediates otherwise.