org.apache.subversion.javahl.types
Class RevisionRange

java.lang.Object
  extended by org.apache.subversion.javahl.types.RevisionRange
All Implemented Interfaces:
Serializable, Comparable<RevisionRange>

public class RevisionRange
extends Object
implements Comparable<RevisionRange>, Serializable

Object that describes a revision range

See Also:
Serialized Form

Constructor Summary
protected RevisionRange(long from, long to, boolean inheritable)
          Creates a new instance.
  RevisionRange(Revision from, Revision to)
           
  RevisionRange(Revision from, Revision to, boolean inheritable)
           
  RevisionRange(String revisionElement)
          Accepts a string in one of these forms: n m-n Parses the results into a from and to revision
 
Method Summary
 int compareTo(RevisionRange range)
          Note: Explicitly ignores inheritable state.
 boolean equals(Object range)
           
 Revision getFromRevision()
           
static Long getRevisionAsLong(Revision rev)
           
 Revision getToRevision()
           
 int hashCode()
           
 boolean isInheritable()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RevisionRange

protected RevisionRange(long from,
                        long to,
                        boolean inheritable)
Creates a new instance. Called by native library.


RevisionRange

public RevisionRange(Revision from,
                     Revision to,
                     boolean inheritable)
Since:
1.9

RevisionRange

public RevisionRange(Revision from,
                     Revision to)

RevisionRange

public RevisionRange(String revisionElement)
Accepts a string in one of these forms: n m-n Parses the results into a from and to revision

Parameters:
revisionElement - revision range or single revision
Method Detail

getFromRevision

public Revision getFromRevision()

getToRevision

public Revision getToRevision()

isInheritable

public boolean isInheritable()

toString

public String toString()
Overrides:
toString in class Object

getRevisionAsLong

public static Long getRevisionAsLong(Revision rev)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object range)
Overrides:
equals in class Object
Parameters:
range - The RevisionRange to compare this object to.

compareTo

public int compareTo(RevisionRange range)
Note: Explicitly ignores inheritable state.

Specified by:
compareTo in interface Comparable<RevisionRange>
Parameters:
range - The RevisionRange to compare this object to.