Package com.jalios.jstore
Class Stamp
- java.lang.Object
-
- com.jalios.jstore.Stamp
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
static java.lang.String
STAMP_SEPARATOR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Stamp stamp)
Compares this stamp with the specified stamp for order.boolean
equals(java.lang.Object obj)
long
getTime()
Get the value of time.java.lang.String
getUrid()
Get the value of urid.int
hashCode()
static Stamp
max(Stamp s1, Stamp s2)
Return the greater of two stampsstatic Stamp
min(Stamp s1, Stamp s2)
Return the smaller of two stampsvoid
setTime(long time)
Set the value of time.void
setUrid(java.lang.String urid)
Set the value of urid.java.lang.String
toString()
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
STAMP_SEPARATOR
public static final java.lang.String STAMP_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUrid
public java.lang.String getUrid()
Get the value of urid.- Returns:
- Value of urid.
-
setUrid
public void setUrid(java.lang.String urid)
Set the value of urid.- Parameters:
urid
- Value to assign to urid.
-
getTime
public long getTime()
Get the value of time.- Returns:
- Value of time.
-
setTime
public void setTime(long time)
Set the value of time.- Parameters:
time
- Value to assign to time.
-
compareTo
public int compareTo(Stamp stamp)
Compares this stamp with the specified stamp for order. Returns a negative integer, zero, or a positive integer as this stamp is less than, equal to, or greater than the specified stamp. The time stamps are first compared. If they are equals, the urids are compared.- Specified by:
compareTo
in interfacejava.lang.Comparable<Stamp>
- Parameters:
stamp
- the Stamp to be compared.- Returns:
- a negative integer, zero, or a positive integer as this stamp is less than, equal to, or greater than the specified stamp.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
min
public static Stamp min(Stamp s1, Stamp s2)
Return the smaller of two stamps- Parameters:
s1
- a stamps2
- a stamp- Returns:
- the smaller of s1 and s2
-
max
public static Stamp max(Stamp s1, Stamp s2)
Return the greater of two stamps- Parameters:
s1
- a stamps2
- a stamp- Returns:
- the greater of s1 and s2
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-