Package org.tmatesoft.svn.core
Class SVNNodeKind
java.lang.Object
org.tmatesoft.svn.core.SVNNodeKind
- All Implemented Interfaces:
Serializable
,Comparable
The SVNNodeKind class is used to describe the kind of a
directory entry (node, in other words). This can be:
- a directory - the node is a directory
- a file - the node is a file
- none - the node is missing (does not exist)
- unknown - the node kind can not be recognized
- Since:
- 1.2
- Version:
- 1.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SVNNodeKind
Defines the directory node kindstatic final SVNNodeKind
Defines the file node kindprivate int
static final SVNNodeKind
This node kind is used to say that a node is missingprivate static final long
static final SVNNodeKind
This node kind is used to say that the kind of a node is actually unknown -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Compares this object with another one.private static SVNNodeKind
fromID
(int id) int
getID()
static SVNNodeKind
getNodeKindById
(int id) static SVNNodeKind
Parses the passed string and finds out the node kind.private void
private Object
toString()
Represents the current SVNNodeKind object as a string.private void
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
NONE
This node kind is used to say that a node is missing -
FILE
Defines the file node kind -
DIR
Defines the directory node kind -
UNKNOWN
This node kind is used to say that the kind of a node is actually unknown -
myID
private int myID
-
-
Constructor Details
-
SVNNodeKind
private SVNNodeKind(int id)
-
-
Method Details
-
getNodeKindById
-
parseKind
Parses the passed string and finds out the node kind. For instance,parseKind("dir")
will returnDIR
.- Parameters:
kind
- a node kind as a string- Returns:
- an SVNNodeKind representation
-
toString
Represents the current SVNNodeKind object as a string. -
compareTo
Compares this object with another one. Each SVNNodeKind constant has got its own unique id.- Specified by:
compareTo
in interfaceComparable
- Parameters:
o
- an object to compare with- Returns:
- -1 - if
o
is either null, or is not an instance of SVNNodeKind, or the id of this object is smaller than the id ofo
; - 1 - if the id of this object is bigger than the id of
o
; - 0 - if and only if
o
is the same constant value as this one (has the same id)
- -1 - if
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOException
-
readResolve
-
fromID
-
getID
public int getID()
-