| 
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectrice.pastry.NodeSet
Represents an ordered set of NodeHandles. *
| Constructor Summary | |
NodeSet()
Constructor.  | 
|
NodeSet(NodeSet o)
Copy constructor.  | 
|
NodeSet(java.util.Vector s)
Constructor.  | 
|
| Method Summary | |
 NodeHandle | 
get(int i)
Gets the ith element in the set.  | 
 NodeHandle | 
get(NodeId nid)
Finds the NodeHandle associated with a NodeId.  | 
 NodeHandle | 
getHandle(Id id)
Finds the NodeHandle associated with the NodeId.  | 
 NodeHandle | 
getHandle(int i)
Gets the ith element in the set.  | 
 int | 
getIndex(NodeHandle nh)
Gets the Index attribute of the NodeSet object  | 
 int | 
getIndex(NodeId nid)
Gets the index of the element with the given node id.  | 
 int | 
getIndexHandle(Id id)
Gets the index of the element with the given node id.  | 
 java.util.Iterator | 
getIterator()
return an iterator that iterates over the elements of this set  | 
 int | 
indexOf(NodeHandle handle)
determine rank of a member  | 
 boolean | 
insert(int index,
       NodeHandle handle)
insert a member at the given index  | 
 boolean | 
member(NodeHandle handle)
test membership  | 
 boolean | 
memberHandle(Id id)
Verifies if the set contains this particular id.  | 
 boolean | 
put(NodeHandle handle)
Appends a member to the ordered set.  | 
 boolean | 
putHandle(NodeHandle handle)
Puts a NodeHandle into the set.  | 
 void | 
randomize()
Method which randomizes the order of this NodeSet  | 
 void | 
remove(int index)
remove a member at a given position  | 
 NodeHandle | 
remove(NodeHandle handle)
remove a member  | 
 NodeHandle | 
remove(NodeId nid)
Removes a node id and its handle from the set.  | 
 NodeHandle | 
removeHandle(Id id)
Removes a node id and its handle from the set.  | 
 int | 
size()
Gets the number of elements.  | 
 java.lang.String | 
toString()
Returns a string representation of the NodeSet  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public NodeSet()
public NodeSet(java.util.Vector s)
s - DESCRIBE THE PARAMETERpublic NodeSet(NodeSet o)
o - DESCRIBE THE PARAMETER| Method Detail | 
public NodeHandle get(NodeId nid)
get in interface NodeSetInid - a node id.
public NodeHandle get(int i)
get in interface NodeSetIi - an index.
public int getIndex(NodeId nid)
getIndex in interface NodeSetInid - the node id.
public int getIndex(NodeHandle nh)
getIndex in interface NodeSetInh - DESCRIBE THE PARAMETER
public java.util.Iterator getIterator()
public NodeHandle getHandle(Id id)
getHandle in interface NodeHandleSetid - a node id.
public NodeHandle getHandle(int i)
getHandle in interface NodeHandleSeti - an index.
public int getIndexHandle(Id id)
                   throws java.util.NoSuchElementException
getIndexHandle in interface NodeHandleSetid - the id.
java.util.NoSuchElementException - DESCRIBE THE EXCEPTIONpublic boolean put(NodeHandle handle)
put in interface NodeSetIhandle - the handle to put.
public void randomize()
public NodeHandle remove(NodeId nid)
nid - the node to remove.
public int size()
size in interface NodeSetI
public boolean insert(int index,
                      NodeHandle handle)
index - the position at which to insert the element into the ordered
      sethandle - the handle to add
public NodeHandle remove(NodeHandle handle)
remove in interface NodeSetIhandle - the handle to remove
public void remove(int index)
index - the position of the member to removepublic int indexOf(NodeHandle handle)
handle - the handle to test
public boolean member(NodeHandle handle)
member in interface NodeSetIhandle - the handle to test
public java.lang.String toString()
public boolean putHandle(NodeHandle handle)
putHandle in interface NodeHandleSethandle - the handle to put.
public boolean memberHandle(Id id)
memberHandle in interface NodeHandleSetid - a node id.
public NodeHandle removeHandle(Id id)
removeHandle in interface NodeHandleSetid - DESCRIBE THE PARAMETER
  | 
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||