|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.pastry.IdSet
Represents a set of Pastry ids. *
Constructor Summary | |
|
IdSet()
Constructor. |
|
IdSet(IdSet o)
Copy constructor. |
protected |
IdSet(java.util.TreeSet s)
Constructor. |
Method Summary | |
void |
addId(Id id)
add a member |
void |
addMember(Id id)
add a member |
Id |
getHash()
compute a fingerprint of the members in this IdSet |
java.util.Iterator |
getIterator()
return an iterator over the elements of this set |
Id |
hash()
return a hash of this set |
boolean |
isMember(Id id)
test membership |
boolean |
isMemberId(Id id)
test membership |
Id |
maxMember()
return the largest member id |
Id |
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 |
IdSet |
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 |
IdSet |
subSet(IdRange 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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IdSet()
protected IdSet(java.util.TreeSet s)
s
- the TreeSet based on which we construct a new IdSetpublic IdSet(IdSet o)
o
- the IdSet to copyMethod Detail |
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 boolean isMember(Id id)
id
- the id to test
public Id minMember()
public Id maxMember()
public IdSet subSet(Id from, Id to)
from
- the counterclockwise end of the range (inclusive)to
- the clockwise end of the range (exclusive)
public IdSet subSet(IdRange range)
range
- the range
public java.util.Iterator getIterator()
getIterator
in interface IdSet
public Id getHash()
public java.lang.String toString()
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 boolean isMemberId(Id id)
isMemberId
in interface IdSet
id
- the id to test
public IdSet subSet(IdRange range)
subSet
in interface IdSet
public Id hash()
hash
in interface IdSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |