public class Revision
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Revision.DateSpec
class to specify a revision by a date
|
static class |
Revision.Kind
Various ways of specifying revisions.
|
static class |
Revision.Number
class to specify a Revision by number
|
Modifier and Type | Field and Description |
---|---|
static Revision |
BASE
base revision of working copy
|
static Revision |
COMMITTED
last committed revision, needs working copy
|
static Revision |
HEAD
last committed revision
|
static Revision |
PREVIOUS
previous committed revision, needs working copy
|
protected Revision.Kind |
revKind
kind of revision specified
|
private static long |
serialVersionUID |
static Revision |
START
first existing revision
|
static int |
SVN_INVALID_REVNUM
Marker revision number for no real revision
|
static Revision |
WORKING
working version in working copy
|
Constructor and Description |
---|
Revision(Revision.Kind kind)
Internally create a new revision.
|
Modifier and Type | Method and Description |
---|---|
(package private) static Revision.Number |
createNumber(long revNumber)
Factory which creates
#Number objects for valid
revision numbers only (those greater than zero). |
boolean |
equals(java.lang.Object target)
compare to revision objects
|
static Revision |
getInstance(java.util.Date revisionDate)
Creates a Revision.DateSpec objet
|
static Revision |
getInstance(long revisionNumber)
Creates a Revision.Number object
|
Revision.Kind |
getKind()
Returns the kind of the Revsion
|
int |
hashCode() |
java.lang.String |
toString()
return the textual representation of the revision
|
private static final long serialVersionUID
protected Revision.Kind revKind
public static final Revision HEAD
public static final Revision START
public static final Revision COMMITTED
public static final Revision PREVIOUS
public static final Revision BASE
public static final Revision WORKING
public static final int SVN_INVALID_REVNUM
public Revision(Revision.Kind kind)
kind
- kind of revisionpublic Revision.Kind getKind()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object target)
equals
in class java.lang.Object
target
- public static Revision getInstance(long revisionNumber)
revisionNumber
- the revision number of the new objectjava.lang.IllegalArgumentException
- If the specified revision
number is invalid.static Revision.Number createNumber(long revNumber)
#Number
objects for valid
revision numbers only (those greater than zero). For internal
usage to avoid an IllegalArgumentException, where no external
consumer of the javahl API passed an invalid revision number.revNumber
- The revision number to create an object for.revNumber
, or
null
if the revision number was invalid.public static Revision getInstance(java.util.Date revisionDate)
revisionDate
- the date of the new object