Rice Pastry API

rice.p2p.commonapi
Interface IdSet

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

public interface IdSet
extends java.io.Serializable

Version:
$Id: IdSet.java,v 1.2 2003/06/11 17:24:48 amislove Exp $
Author:
Alan Mislove, Peter Druschel

Method Summary
 void addId(rice.p2p.commonapi.Id id)
          add a member
 java.util.Iterator getIterator()
          return an iterator over the elements of this set
 boolean isMemberId(rice.p2p.commonapi.Id id)
          test membership
 int numElements()
          return the number of elements
 void removeId(rice.p2p.commonapi.Id id)
          remove a member
 rice.p2p.commonapi.IdSet subSet(rice.p2p.commonapi.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(rice.p2p.commonapi.Id id)
add a member

Parameters:
id - the id to add

removeId

public void removeId(rice.p2p.commonapi.Id id)
remove a member

Parameters:
id - the id to remove

isMemberId

public boolean isMemberId(rice.p2p.commonapi.Id id)
test membership

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

subSet

public rice.p2p.commonapi.IdSet subSet(rice.p2p.commonapi.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

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection