Package org.tmatesoft.svn.core
Class SVNDepth
java.lang.Object
org.tmatesoft.svn.core.SVNDepth
- All Implemented Interfaces:
Comparable
This class contains enumeration that describes depth,
that is used.
The order of these depths is important: the higher the number,
the deeper it descends. You can use it to compare two depths
numerically to decide which goes deeper.
- Since:
- 1.2
- Version:
- 1.3
- Author:
- TMate Software Ltd.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SVNDepthJust the named directory D, no entries.static final SVNDepthExclude (don't descend into) directory D.static final SVNDepthD and its file children, but not subdirectories.static final SVNDepthD and its immediate children (D and its entries).static final SVNDepthD and all descendants (full recursion from D).static final SVNDepthDepth undetermined or ignored. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringAppropriate name ofdepthis returned.intCompares this object to another one.booleanSays whether this object andobjare equal.static SVNDepthfromID(int id) Based on depth id returnsSVNDepthvalue.static SVNDepthfromRecurse(boolean recurse) Treats recursion asINFINITYdepth andFILESotherwisestatic SVNDepthfromString(String string) Based on string value findsSVNDepthvalue.intgetId()Gets numerical Id of depthstatic SVNDepthgetInfinityOrEmptyDepth(boolean recurse) ReturnsINFINITYifrecurseistrue, else returnsEMPTY.static SVNDepthgetInfinityOrFilesDepth(boolean recurse) The same asgetInfinityOrEmptyDepth(boolean), butFILESis returned when recursive.static SVNDepthgetInfinityOrImmediatesDepth(boolean recurse) The same asgetInfinityOrEmptyDepth(boolean), butIMMEDIATESis returned when recursive.getName()Gets the name of depthstatic SVNDepthgetUnknownOrEmptyDepth(boolean recurse) ReturnsUNKNOWNifrecurseistrue, else returnsEMPTY.static SVNDepthgetUnknownOrFilesDepth(boolean recurse) The same asgetUnknownOrEmptyDepth(boolean), butFILESis returned when recursive.static SVNDepthgetUnknownOrImmediatesDepth(boolean recurse) The same asgetUnknownOrEmptyDepth(boolean), butIMMEDIATESis returned when recursive.booleanReturns a recursion boolean based on depth.static booleanrecurseFromDepth(SVNDepth depth) Based on depth determines if it is recursive or not.toString()Returns a string representation of this object.
-
Field Details
-
UNKNOWN
Depth undetermined or ignored. -
EXCLUDE
Exclude (don't descend into) directory D. -
EMPTY
Just the named directory D, no entries. For instance, update will not pull in any files or subdirectories. -
FILES
D and its file children, but not subdirectories. For instance, updates will pull in any files, but not subdirectories. -
IMMEDIATES
D and its immediate children (D and its entries). Updates will pull in any files or subdirectories without any children. -
INFINITY
D and all descendants (full recursion from D). For instance, updates will pull in any files or subdirectories recursively.
-
-
Method Details
-
getId
public int getId()Gets numerical Id of depth- Returns:
- depth Id
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
getName
Gets the name of depth- Returns:
- depth name
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
toString
Returns a string representation of this object. -
isRecursive
public boolean isRecursive()Returns a recursion boolean based on depth. Although much code has been converted to use depth, some code still takes a recurse boolean. In most cases, it makes sense to treat unknown or infinite depth as recursive, and any other depth as non-recursive (which in turn usually translates toFILES).- Returns:
- if recursion is used
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
compareTo
Compares this object to another one.- Specified by:
compareToin interfaceComparable- Parameters:
o- object to compare with- Returns:
-1ifois null, or not anSVNDepthinstance, or itsidis greater than this object's id;0if ids this object andoare equal;1if id of this object is greater than the one ofo.
-
equals
Says whether this object andobjare equal. -
asString
Appropriate name ofdepthis returned. Ifdepthdoes not represent a recognized depth,"INVALID-DEPTH"is returned.- Parameters:
depth- depth, which name needs to be returned- Returns:
- the name of depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
recurseFromDepth
Based on depth determines if it is recursive or not. In most cases, it makes sense to treat unknown or infinite depth as recursive, and any other depth as non-recursive- Parameters:
depth- depth value- Returns:
- if it is recursive
- Since:
- SVNKit 1.2.0, SVN 1.5.0
- See Also:
-
fromRecurse
Treats recursion asINFINITYdepth andFILESotherwise- Parameters:
recurse- indicator of recursion- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
- See Also:
-
fromString
Based on string value findsSVNDepthvalue.- Parameters:
string- depth value represented by string- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
fromID
Based on depth id returnsSVNDepthvalue.- Parameters:
id- depth id- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
getInfinityOrEmptyDepth
ReturnsINFINITYifrecurseistrue, else returnsEMPTY. Code should never need to use this, it is called only from pre-depth APIs, for compatibility.- Parameters:
recurse- boolean- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
getInfinityOrFilesDepth
The same asgetInfinityOrEmptyDepth(boolean), butFILESis returned when recursive. Code should never need to use this, it is called only from pre-depth APIs, for compatibility.- Parameters:
recurse- boolean- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
getInfinityOrImmediatesDepth
The same asgetInfinityOrEmptyDepth(boolean), butIMMEDIATESis returned when recursive. Code should never need to use this, it is called only from pre-depth APIs, for compatibility.- Parameters:
recurse- boolean- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
getUnknownOrEmptyDepth
ReturnsUNKNOWNifrecurseistrue, else returnsEMPTY. Code should never need to use this, it is called only from pre-depth APIs, for compatibility.- Parameters:
recurse- boolean- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
getUnknownOrFilesDepth
The same asgetUnknownOrEmptyDepth(boolean), butFILESis returned when recursive. Code should never need to use this, it is called only from pre-depth APIs, for compatibility.- Parameters:
recurse- boolean- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-
getUnknownOrImmediatesDepth
The same asgetUnknownOrEmptyDepth(boolean), butIMMEDIATESis returned when recursive. Code should never need to use this, it is called only from pre-depth APIs, for compatibility.- Parameters:
recurse- boolean- Returns:
- depth
- Since:
- SVNKit 1.2.0, SVN 1.5.0
-