|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.hash.span.HashSpanCollection
public class HashSpanCollection
Use to manage and make modifications to a group of HashSpans.
| Constructor Summary | |
|---|---|
HashSpanCollection()
The default constructor. |
|
HashSpanCollection(java.util.Collection<HashSpan> hashSpans)
The constructor to use for starting with a group of hash spans. |
|
| Method Summary | |
|---|---|
void |
addAll(java.util.Collection<HashSpan> hashSpans)
Adds all the hash spans in the given collection to this collection. |
static boolean |
areEqual(java.util.Collection<HashSpan> hashSpans1,
java.util.Collection<HashSpan> hashSpans2)
Determines the given collections of hash spans are equivalent. |
HashSpanCollection |
clone()
Creates a clone of this hash span collection. |
boolean |
equals(java.lang.Object o)
Returns whether the hash spans contained within this and the given are equivalent. |
java.util.Collection<HashSpan> |
getHashSpans()
The hash spans contained within the collection. |
java.util.Collection<HashSpan> |
getMissingHashSpans()
Returns a collection of hash spans that represent the ranges of hashes that are required to complete a full hash span. |
boolean |
isFullHashSpan()
Whether the collection of hash spans together represent the full range of hashes. |
static HashSpan |
merge(HashSpan hs1,
HashSpan hs2)
Makes one hash span from two. |
static void |
merge(java.util.List<HashSpan> hashSpans)
Merge a collection of hash spans as much as possible |
void |
removeAll(java.util.Collection<HashSpan> hashSpans)
Removes all the hash spans in the given collection from this collection. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashSpanCollection()
The default constructor.
public HashSpanCollection(java.util.Collection<HashSpan> hashSpans)
The constructor to use for starting with a group of hash spans.
hashSpans - The hash spans to start with.| Method Detail |
|---|
public java.util.Collection<HashSpan> getHashSpans()
The hash spans contained within the collection.
public void addAll(java.util.Collection<HashSpan> hashSpans)
Adds all the hash spans in the given collection to this collection.
hashSpans - A collection of hash spans.public void removeAll(java.util.Collection<HashSpan> hashSpans)
Removes all the hash spans in the given collection from this collection.
hashSpans - A collection of hash spans.public java.util.Collection<HashSpan> getMissingHashSpans()
Returns a collection of hash spans that represent the ranges of hashes that are required to complete a full hash span.
public boolean isFullHashSpan()
Whether the collection of hash spans together represent the full range of hashes.
public HashSpanCollection clone()
Creates a clone of this hash span collection.
clone in class java.lang.Objectpublic boolean equals(java.lang.Object o)
Returns whether the hash spans contained within this and the given are equivalent.
equals in class java.lang.Objecto - A hash span collection.
public static void merge(java.util.List<HashSpan> hashSpans)
Merge a collection of hash spans as much as possible
Merging consists of taking overlapping hash spans and combining them into a single hash span as much as is possible.
hashSpans - A list of hash spans.
public static HashSpan merge(HashSpan hs1,
HashSpan hs2)
Makes one hash span from two.
Given hash spans must overlap or be adjacent.
hs1 - A hash span.hs2 - A hash span.
public static boolean areEqual(java.util.Collection<HashSpan> hashSpans1,
java.util.Collection<HashSpan> hashSpans2)
Determines the given collections of hash spans are equivalent.
hashSpans1 - A collection of hash spans.hashSpans2 - A collection of hash spans.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||