Class Revision

java.lang.Object
org.apache.subversion.javahl.types.Revision
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Revision.DateSpec, Revision.Number

public class Revision
extends Object
implements Serializable
Class to specify a revision in a svn command.
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • Revision

      public Revision​(Revision.Kind kind)
      Internally create a new revision. Public for backward compat reasons. Callers should use getInstance() instead.
      Parameters:
      kind - kind of revision
  • Method Details

    • getKind

      public Revision.Kind getKind()
      Returns the kind of the Revsion
      Returns:
      kind
    • toString

      public String toString()
      return the textual representation of the revision
      Overrides:
      toString in class Object
      Returns:
      english text
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals​(Object target)
      compare to revision objects
      Overrides:
      equals in class Object
      Parameters:
      target -
      Returns:
      if both object have equal content
    • getInstance

      public static Revision getInstance​(long revisionNumber)
      Creates a Revision.Number object
      Parameters:
      revisionNumber - the revision number of the new object
      Returns:
      the new object
      Throws:
      IllegalArgumentException - If the specified revision number is invalid.
    • getInstance

      public static Revision getInstance​(Date revisionDate)
      Creates a Revision.DateSpec objet
      Parameters:
      revisionDate - the date of the new object
      Returns:
      the new object