|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.p2p.glacier.VersionKeySet
public class VersionKeySet
DESCRIBE THE CLASS
Constructor Summary | |
---|---|
|
VersionKeySet()
Constructor. |
protected |
VersionKeySet(java.util.SortedMap s)
Constructor. |
|
VersionKeySet(VersionKeySet o)
Copy constructor. |
Method Summary | |
---|---|
void |
addId(Id id)
add a member |
void |
addMember(Id id)
add a member |
Id[] |
asArray()
return this set as an array |
IdSet |
build()
Returns a new, empty IdSet of this type |
java.lang.Object |
clone()
DESCRIBE THE METHOD |
byte[] |
getHash()
compute a fingerprint of the members in this IdSet |
java.util.Iterator<Id> |
getIterator()
return an iterator over the elements of this set |
byte[] |
hash()
return a hash of this set |
boolean |
isMember(Id id)
test membership |
boolean |
isMemberId(Id id)
test membership |
VersionKey |
maxMember()
return the largest member id |
VersionKey |
minMember()
return the smallest member id |
int |
numElements()
return the number of elements |
void |
removeId(Id id)
remove a member |
void |
removeMember(Id id)
remove a member |
VersionKeySet |
subSet(Id from,
Id to)
return a subset of this set, consisting of the member ids in a given range |
IdSet |
subSet(IdRange range)
return a subset of this set, consisting of the member ids in a given range |
VersionKeySet |
subSet(VersionKeyRange range)
return a subset of this set, consisting of the member ids in a given range |
java.lang.String |
toString()
Returns a string representation of the IdSet. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VersionKeySet()
public VersionKeySet(VersionKeySet o)
o
- the IdSet to copyprotected VersionKeySet(java.util.SortedMap s)
s
- the TreeSet based on which we construct a new IdSetMethod Detail |
---|
public boolean isMember(Id id)
id
- the id to test
public java.util.Iterator<Id> getIterator()
getIterator
in interface IdSet
public byte[] getHash()
public boolean isMemberId(Id id)
isMemberId
in interface IdSet
id
- the id to test
public int numElements()
numElements
in interface IdSet
public void addMember(Id id)
id
- the id to addpublic void removeMember(Id id)
id
- the id to removepublic VersionKey minMember()
public VersionKey maxMember()
public VersionKeySet subSet(Id from, Id to)
from
- the counterclockwise end of the range (inclusive)to
- the clockwise end of the range (exclusive)
public VersionKeySet subSet(VersionKeyRange range)
range
- the range
public java.lang.String toString()
toString
in class java.lang.Object
public void addId(Id id)
addId
in interface IdSet
id
- the id to addpublic void removeId(Id id)
removeId
in interface IdSet
id
- the id to removepublic IdSet subSet(IdRange range)
subSet
in interface IdSet
range
- DESCRIBE THE PARAMETER
public byte[] hash()
hash
in interface IdSet
public java.lang.Object clone()
clone
in interface IdSet
clone
in class java.lang.Object
public IdSet build()
build
in interface IdSet
public Id[] asArray()
asArray
in interface IdSet
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |