public class StampTable
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
Constructor and Description |
---|
StampTable() |
StampTable(StampTable other) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
int |
compareLogEntry(LogEntry logEntry)
Compares the given stamp of the logEntry with the ones in the table.
|
int |
compareStamp(Stamp stamp)
Compares the given stamp with the ones in the table.
|
boolean |
equals(java.lang.Object obj) |
Stamp |
getBehindStamp(StampTable st)
Gets the most behind stamp of this StampTable according the given StampTable.
|
Stamp |
getBehindStamp(StampTable st,
boolean useRealStamp)
Gets the most behind stamp of this StampTable according the given StampTable.
|
java.util.Map<java.lang.String,Stamp> |
getMap() |
Stamp |
getMaxStamp()
Returns the highest stamp contains in this StampTable
|
Stamp |
getMinStamp()
Returns the smallest stamp contains in this StampTable
|
StampTable |
getMinTable(StampTable st)
Build a new StampTable for this one and the given one.
|
Stamp |
getRealStamp(java.lang.String urid)
Returns the stamps to which this StampTable maps the specified
urid.
|
Stamp |
getStamp(java.lang.String urid)
Returns the stamps to which this StampTable maps the specified
urid.
|
boolean |
isGreaterThan(Stamp stamp,
boolean isStrict)
Check if this StampTable contains at least one stamp greater than
the given stamp.
|
boolean |
isGreaterThan(StampTable other,
boolean isStrict)
Checks if this StampTable is greater than the given one.
|
boolean |
isGreaterThan(StampTable other,
boolean isStrict,
java.lang.String uridToIgnore)
Checks if this StampTable is greater than the given one.
|
boolean |
isGreaterThanStamp(Stamp other,
boolean isStrict)
Checks if this StampTable contains a stamp greater than the given one.
|
boolean |
isLesserThan(Stamp stamp,
boolean isStrict)
Check if all the stamps of this StampTable are lesser than
the given stamp.
|
boolean |
isLesserThan(StampTable other,
boolean isStrict)
Checks if this StampTable is lesser than the given one.
|
boolean |
isLesserThan(StampTable other,
boolean isStrict,
java.lang.String uridToIgnore)
Checks if this StampTable is lesser than the given one.
|
boolean |
isLesserThanStamp(Stamp other,
boolean isStrict)
Checks if this StampTable contains a stamp lesser than the given one.
|
boolean |
isPartiallyGreaterThan(StampTable other)
Checks if this StampTable is partially greater than the given one.
|
void |
putStamp(Stamp stamp)
Puts this stamp in the StampTable
|
java.lang.String |
toString() |
public static final java.lang.String REVISION
public StampTable()
public StampTable(StampTable other)
public java.util.Map<java.lang.String,Stamp> getMap()
public java.lang.Object clone()
clone
in class java.lang.Object
public void putStamp(Stamp stamp)
stamp
- the stamp to be addedpublic Stamp getStamp(java.lang.String urid)
urid
- urid whose associated stamp is to be returned.public Stamp getRealStamp(java.lang.String urid)
urid
- urid whose associated stamp is to be returned.public int compareStamp(Stamp stamp)
stamp
- the stamp to be comparedpublic int compareLogEntry(LogEntry logEntry)
logEntry
- the logEntry to be comparedcompareStamp(Stamp)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean isGreaterThan(StampTable other, boolean isStrict)
other
- the other table to be comparedisStrict
- true if strict comparisonisGreaterThan(StampTable,boolean,String)
public boolean isGreaterThan(StampTable other, boolean isStrict, java.lang.String uridToIgnore)
other
- the other table to be comparedisStrict
- true if strict comparisonuridToIgnore
- this urid will be ignored for the comparison (can be null)public boolean isLesserThan(StampTable other, boolean isStrict)
other
- the other table to be comparedisStrict
- true if strict comparisonisGreaterThan(StampTable,boolean,String)
public boolean isLesserThan(StampTable other, boolean isStrict, java.lang.String uridToIgnore)
other
- the other table to be comparedisStrict
- true if strict comparisonuridToIgnore
- this urid will be ignored for the comparison (can be null)isGreaterThan(StampTable,boolean,String)
public boolean isGreaterThan(Stamp stamp, boolean isStrict)
stamp
- the stamp to be comparedisStrict
- true if strict comparisonisLesserThan(Stamp,boolean)
public boolean isLesserThan(Stamp stamp, boolean isStrict)
stamp
- the stamp to be comparedisStrict
- true if strict comparisonisGreaterThan(Stamp,boolean)
public boolean isPartiallyGreaterThan(StampTable other)
other
- the other table to be comparedpublic boolean isGreaterThanStamp(Stamp other, boolean isStrict)
other
- the stamp to be comparedisStrict
- true if strict comparisonisLesserThanStamp(Stamp,boolean)
public boolean isLesserThanStamp(Stamp other, boolean isStrict)
other
- the stamp to be comparedisStrict
- true if strict comparisonisGreaterThanStamp(Stamp,boolean)
public Stamp getMinStamp()
Stamp.min(Stamp,Stamp)
public Stamp getMaxStamp()
Stamp.max(Stamp,Stamp)
public Stamp getBehindStamp(StampTable st)
st
- the StampTable to compare withpublic Stamp getBehindStamp(StampTable st, boolean useRealStamp)
st
- the StampTable to compare withuseRealStamp
- if true, considere missing stamp as (urid, 0)public StampTable getMinTable(StampTable st)
st
- the StampTable to usedgetRealStamp(String)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2001-2010 Jalios SA. All Rights Reserved.