Package org.tmatesoft.svn.core
Class SVNNodeKind
- java.lang.Object
-
- org.tmatesoft.svn.core.SVNNodeKind
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
public final class SVNNodeKind extends java.lang.Object implements java.lang.Comparable, java.io.Serializable
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:
SVNDirEntry
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static SVNNodeKind
DIR
Defines the directory node kindstatic SVNNodeKind
FILE
Defines the file node kindprivate int
myID
static SVNNodeKind
NONE
This node kind is used to say that a node is missingprivate static long
serialVersionUID
static SVNNodeKind
UNKNOWN
This node kind is used to say that the kind of a node is actually unknown
-
Constructor Summary
Constructors Modifier Constructor Description private
SVNNodeKind(int id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(java.lang.Object o)
Compares this object with another one.private static SVNNodeKind
fromID(int id)
int
getID()
static SVNNodeKind
getNodeKindById(int id)
static SVNNodeKind
parseKind(java.lang.String kind)
Parses the passed string and finds out the node kind.private void
readObject(java.io.ObjectInputStream is)
private java.lang.Object
readResolve()
java.lang.String
toString()
Represents the current SVNNodeKind object as a string.private void
writeObject(java.io.ObjectOutputStream os)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
NONE
public static final SVNNodeKind NONE
This node kind is used to say that a node is missing
-
FILE
public static final SVNNodeKind FILE
Defines the file node kind
-
DIR
public static final SVNNodeKind DIR
Defines the directory node kind
-
UNKNOWN
public static final SVNNodeKind UNKNOWN
This node kind is used to say that the kind of a node is actually unknown
-
myID
private int myID
-
-
Method Detail
-
getNodeKindById
public static SVNNodeKind getNodeKindById(int id)
-
parseKind
public static SVNNodeKind parseKind(java.lang.String kind)
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
public java.lang.String toString()
Represents the current SVNNodeKind object as a string.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this object.
-
compareTo
public int compareTo(java.lang.Object o)
Compares this object with another one. Each SVNNodeKind constant has got its own unique id.- Specified by:
compareTo
in interfacejava.lang.Comparable
- 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
private void writeObject(java.io.ObjectOutputStream os) throws java.io.IOException
- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
readResolve
private java.lang.Object readResolve()
-
fromID
private static SVNNodeKind fromID(int id)
-
getID
public int getID()
-
-