public class VersionVector extends java.lang.Object implements java.lang.Comparable<VersionVector>, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Comparable<java.lang.Object> |
MAX_VALUE
A value that is greater then any other value
|
static java.lang.Comparable<java.lang.Object> |
MAXS_VALUE
A value that is greater then any string but less then
MAX_VALUE and
any Integer or VersionVector. |
static java.lang.Comparable<java.lang.Object> |
MIN_VALUE
A value that is less then any other value
|
static java.lang.String |
MINS_VALUE
A value that is greater then
MIN_VALUE and less then any string,
Integer, or VersionVector (a.k.a. empty_string) |
| Constructor and Description |
|---|
VersionVector(java.lang.Comparable<?>[] vector,
java.lang.Comparable<?> pad) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(VersionVector ov) |
boolean |
equals(java.lang.Object o) |
java.lang.Comparable<?> |
getPad()
Returns the pad value used when comparing this versions to
versions that has a raw vector with a larger number of elements
|
java.lang.Comparable<?> |
getSegment(int index)
An element from the raw vector
|
int |
getSegmentCount()
Returns the number of elements in the raw vector
|
int |
hashCode() |
java.lang.String |
toString() |
void |
toString(java.lang.StringBuffer sb)
Append the string representation of this instance to the
sb buffer. |
public static final java.lang.Comparable<java.lang.Object> MAX_VALUE
public static final java.lang.Comparable<java.lang.Object> MAXS_VALUE
MAX_VALUE and
any Integer or VersionVector.public static final java.lang.Comparable<java.lang.Object> MIN_VALUE
public static final java.lang.String MINS_VALUE
MIN_VALUE and less then any string,
Integer, or VersionVector (a.k.a. empty_string)public VersionVector(java.lang.Comparable<?>[] vector,
java.lang.Comparable<?> pad)
public int compareTo(VersionVector ov)
compareTo in interface java.lang.Comparable<VersionVector>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.Comparable<?> getPad()
null if not set.public java.lang.Comparable<?> getSegment(int index)
index - The zero based index of the desired elementpublic int getSegmentCount()
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void toString(java.lang.StringBuffer sb)
sb buffer.sb - The buffer to append to