Package org.tigris.subversion.javahl
Class Revision
java.lang.Object
org.tigris.subversion.javahl.Revision
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
Revision.DateSpec,Revision.Number
public class Revision
extends java.lang.Object
implements java.io.Serializable
Class to specify a revision in a svn command.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classclass to specify a revision by a datestatic final classVarious ways of specifying revisions.static classclass to specify a Revision by number -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Revisionbase revision of working copystatic final Revisionlast committed revision, needs working copystatic final Revisionlast committed revisionstatic final Revisionprevious committed revision, needs working copyprotected intkind of revision specifiedprivate static final longstatic final Revisionfirst existing revisionstatic final intMarker revision number for no real revisionstatic final Revisionworking version in working copy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RevisioncreateFromApache(Revision aRev) (package private) static Revision.NumbercreateNumber(long revNumber) Factory which creates#Numberobjects for valid revision numbers only (those greater than zero).booleanequals(java.lang.Object target) compare to revision objectsstatic RevisiongetInstance(long revisionNumber) Creates a Revision.Number objectstatic RevisiongetInstance(java.util.Date revisionDate) Creates a Revision.DateSpec objetintgetKind()Returns the kind of the RevsioninthashCode()toApache()java.lang.StringtoString()return the textual representation of the revisionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
revKind
protected int revKindkind of revision specified -
HEAD
last committed revision -
START
first existing revision -
COMMITTED
last committed revision, needs working copy -
PREVIOUS
previous committed revision, needs working copy -
BASE
base revision of working copy -
WORKING
working version in working copy -
SVN_INVALID_REVNUM
public static final int SVN_INVALID_REVNUMMarker revision number for no real revision- See Also:
-
-
Constructor Details
-
Revision
public Revision(int kind) Deprecated.Create a new revision- Parameters:
kind- kind of revision
-
Revision
protected Revision(int kind, boolean marker) Internally create a new revision- Parameters:
kind- kind of revisionmarker- marker to differentiate from the public deprecated version
-
-
Method Details
-
getKind
public int getKind()Returns the kind of the Revsion- Returns:
- kind
-
toString
public java.lang.String toString()return the textual representation of the revision- Overrides:
toStringin classjava.lang.Object- Returns:
- english text
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object target) compare to revision objects- Overrides:
equalsin classjava.lang.Object- Parameters:
target-- Returns:
- if both object have equal content
-
getInstance
Creates a Revision.Number object- Parameters:
revisionNumber- the revision number of the new object- Returns:
- the new object
- Throws:
java.lang.IllegalArgumentException- If the specified revision number is invalid.
-
createNumber
Factory which creates#Numberobjects 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.- Parameters:
revNumber- The revision number to create an object for.- Returns:
- An object representing
revNumber, ornullif the revision number was invalid. - Since:
- 1.2
-
getInstance
Creates a Revision.DateSpec objet- Parameters:
revisionDate- the date of the new object- Returns:
- the new object
-
toApache
-
createFromApache
-