rice.p2p.commonapi
Interface IdSet

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
IdSet

public interface IdSet
extends java.io.Serializable


Method Summary
 void addId(Id id)
          add a member
 java.util.Iterator getIterator()
          return an iterator over the elements of this set
 Id hash()
          return a hash of this set
 boolean isMemberId(Id id)
          test membership
 int numElements()
          return the number of elements
 void removeId(Id id)
          remove a member
 IdSet subSet(IdRange range)
          return a subset of this set, consisting of the member ids in a given range
 

Method Detail

numElements

public int numElements()
return the number of elements


addId

public void addId(Id id)
add a member

Parameters:
id - the id to add

removeId

public void removeId(Id id)
remove a member

Parameters:
id - the id to remove

isMemberId

public boolean isMemberId(Id id)
test membership

Parameters:
id - the id to test
Returns:
true of id is a member, false otherwise

subSet

public IdSet subSet(IdRange range)
return a subset of this set, consisting of the member ids in a given range

Returns:
the subset

getIterator

public java.util.Iterator getIterator()
return an iterator over the elements of this set

Returns:
the interator

hash

public Id hash()
return a hash of this set

Returns:
the hash of this set





Imprint-Dataprotection