|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.hash.span.HashSpan
public class HashSpan
Represents a range of hashes.
| Field Summary | |
|---|---|
static BigHash |
FIRST
Constant of the first and last possible BigHash possible. |
static HashSpan |
FULL
Full hash span |
static java.util.Set<HashSpan> |
FULL_SET
|
static BigHash |
LAST
Constant of the first and last possible BigHash possible. |
| Constructor Summary | |
|---|---|
HashSpan(BigHash first,
BigHash last)
|
|
| Method Summary | |
|---|---|
HashSpan |
clone()
Return a cloned copy of this HashSpan object. |
int |
compareTo(HashSpan hs)
Compare the equality (first hash) of another HashSpan. |
boolean |
contains(BigHash hash)
Returns true if has is between the first and last hashes in hash span range. |
boolean |
equals(java.lang.Object o)
Returns true if two hash spans are the same; false otherwise. |
BigHash |
getFirst()
Retrieve first BigHash portion of HashSpan. |
BigHash |
getLast()
Retrieve last BigHash portion of HashSpan. |
int |
hashCode()
Return the hash code of the HashSpan. |
boolean |
isAdjecentTo(HashSpan hashSpan)
Whether the given hash span has an end BigHash that comes immediately before or after this HashSpan. |
boolean |
overlaps(HashSpan hashSpan)
Whether any BigHash in the given HashSpan is also in this HashSpan. |
void |
setFirst(BigHash first)
Set first BigHash portion of the HashSpan. |
void |
setLast(BigHash last)
Set last BigHash portion of the HashSpan. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final BigHash FIRST
Constant of the first and last possible BigHash possible.
public static final BigHash LAST
Constant of the first and last possible BigHash possible.
public static final HashSpan FULL
Full hash span
public static final java.util.Set<HashSpan> FULL_SET
| Constructor Detail |
|---|
public HashSpan(BigHash first,
BigHash last)
first - last - | Method Detail |
|---|
public BigHash getFirst()
public void setFirst(BigHash first)
first - public BigHash getLast()
public void setLast(BigHash last)
last - public int compareTo(HashSpan hs)
compareTo in interface java.lang.Comparable<HashSpan>hs -
public boolean contains(BigHash hash)
hash - BigHash wish to check if in this hash span
public boolean overlaps(HashSpan hashSpan)
Whether any BigHash in the given HashSpan is also in this HashSpan.
hashSpan -
public boolean isAdjecentTo(HashSpan hashSpan)
Whether the given hash span has an end BigHash that comes immediately before or after this HashSpan.
hashSpan -
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - hash span
public HashSpan clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||