|
||||||||||
| 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(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 |
member(NodeId nid)
test membership using Id |
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 |
remove(int index)
remove a member at a given position |
void |
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)
public NodeSet(NodeSet o)
| Method Detail |
public boolean put(NodeHandle handle)
put in interface NodeSetIhandle - the handle to put.
public NodeHandle get(NodeId nid)
get in interface NodeSetInid - a node id.
public NodeHandle get(int i)
get in interface NodeSetIi - an index.
public boolean member(NodeId nid)
member in interface NodeSetInid - a node id.
public NodeHandle remove(NodeId nid)
remove in interface NodeSetInid - the node to remove.
public int size()
size in interface NodeSetIpublic int getIndex(NodeId nid)
getIndex in interface NodeSetInid - the node id.
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 void remove(NodeHandle handle)
handle - the handle to removepublic 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)
handle - the handle to test
public java.util.Iterator getIterator()
public java.lang.String toString()
public boolean putHandle(NodeHandle handle)
putHandle in interface NodeHandleSethandle - the handle to put.
public NodeHandle getHandle(Id id)
getHandle in interface NodeHandleSetid - a node id.
public NodeHandle getHandle(int i)
getHandle in interface NodeHandleSeti - an index.
public boolean memberHandle(Id id)
memberHandle in interface NodeHandleSetid - a node id.
public NodeHandle removeHandle(Id id)
removeHandle in interface NodeHandleSet
public int getIndexHandle(Id id)
throws java.util.NoSuchElementException
getIndexHandle in interface NodeHandleSetid - the id.
java.util.NoSuchElementException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||