Class SVNRevision
- java.lang.Object
-
- org.tigris.subversion.svnclientadapter.SVNRevision
-
- Direct Known Subclasses:
SVNRevision.DateSpec,SVNRevision.Number
public class SVNRevision extends java.lang.ObjectClass to specify a revision in a svn command. This class has been copied directly from javahl and renamed to SVNRevision the static method getRevision has then been added to the class
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSVNRevision.DateSpecstatic classSVNRevision.KindVarious ways of specifying revisions.static classSVNRevision.Number
-
Field Summary
Fields Modifier and Type Field Description static SVNRevisionBASEstatic SVNRevisionCOMMITTEDprotected static SafeSimpleDateFormatdateFormatstatic SVNRevisionHEADstatic SVNRevision.NumberINVALID_REVISIONstatic SVNRevisionPREVIOUSprotected intrevKindstatic SVNRevisionSTARTstatic intSVN_INVALID_REVNUMstatic SVNRevisionWORKING
-
Constructor Summary
Constructors Constructor Description SVNRevision(int kind)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object target)intgetKind()static SVNRevisiongetRevision(java.lang.String revision)get a revision from a string revision can be : - a date with the following format : MM/DD/YYYY HH:MM AM_PM - a revision number - HEAD, BASE, COMMITED or PREVstatic SVNRevisiongetRevision(java.lang.String revision, java.text.SimpleDateFormat aDateFormat)get a revision from a string revision can be : - a date with the format according todateFormat- a revision number - HEAD, BASE, COMMITED or PREVinthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
dateFormat
protected static final SafeSimpleDateFormat dateFormat
-
revKind
protected int revKind
-
HEAD
public static final SVNRevision HEAD
-
START
public static final SVNRevision START
-
COMMITTED
public static final SVNRevision COMMITTED
-
PREVIOUS
public static final SVNRevision PREVIOUS
-
BASE
public static final SVNRevision BASE
-
WORKING
public static final SVNRevision WORKING
-
SVN_INVALID_REVNUM
public static final int SVN_INVALID_REVNUM
- See Also:
- Constant Field Values
-
INVALID_REVISION
public static final SVNRevision.Number INVALID_REVISION
-
-
Method Detail
-
getKind
public int getKind()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object target)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getRevision
public static SVNRevision getRevision(java.lang.String revision, java.text.SimpleDateFormat aDateFormat) throws java.text.ParseException
get a revision from a string revision can be : - a date with the format according todateFormat- a revision number - HEAD, BASE, COMMITED or PREV- Parameters:
revision-aDateFormat-- Returns:
- Revision
- Throws:
java.text.ParseException- when the revision string cannot be parsed
-
getRevision
public static SVNRevision getRevision(java.lang.String revision) throws java.text.ParseException
get a revision from a string revision can be : - a date with the following format : MM/DD/YYYY HH:MM AM_PM - a revision number - HEAD, BASE, COMMITED or PREV- Parameters:
revision-- Returns:
- Revision
- Throws:
java.text.ParseException- when the revision string cannot be parsed
-
-